Classes | Macros | Typedefs | Functions | Variables
pyscanner.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <qarray.h>
#include <qstack.h>
#include <qregexp.h>
#include <qfile.h>
#include <qfileinfo.h>
#include "pyscanner.h"
#include "entry.h"
#include "message.h"
#include "config.h"
#include "doxygen.h"
#include "util.h"
#include "defargs.h"
#include "language.h"
#include "commentscan.h"
#include "pycode.h"
#include "arguments.h"

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   pyscannerYY_create_buffer
 
#define yy_delete_buffer   pyscannerYY_delete_buffer
 
#define yy_flex_debug   pyscannerYY_flex_debug
 
#define yy_init_buffer   pyscannerYY_init_buffer
 
#define yy_flush_buffer   pyscannerYY_flush_buffer
 
#define yy_load_buffer_state   pyscannerYY_load_buffer_state
 
#define yy_switch_to_buffer   pyscannerYY_switch_to_buffer
 
#define yyin   pyscannerYYin
 
#define yyleng   pyscannerYYleng
 
#define yylex   pyscannerYYlex
 
#define yylineno   pyscannerYYlineno
 
#define yyout   pyscannerYYout
 
#define yyrestart   pyscannerYYrestart
 
#define yytext   pyscannerYYtext
 
#define yywrap   pyscannerYYwrap
 
#define yyalloc   pyscannerYYalloc
 
#define yyrealloc   pyscannerYYrealloc
 
#define yyfree   pyscannerYYfree
 
#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   pyscannerYYrestart(pyscannerYYin )
 
#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   pyscannerYY_flush_buffer(YY_CURRENT_BUFFER )
 
#define yy_new_buffer   pyscannerYY_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 pyscannerYYwrap(n)   1
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   pyscannerYYtext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   163
 
#define YY_END_OF_BUFFER   164
 
#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_INPUT   1
 
#define YY_NO_UNISTD_H   1
 
#define YY_INPUT(buf, result, max_size)   result=yyread(buf,max_size);
 
#define INITIAL   0
 
#define Search   1
 
#define SearchMemVars   2
 
#define TryClassDocString   3
 
#define TripleComment   4
 
#define SpecialComment   5
 
#define FunctionDec   6
 
#define FunctionParams   7
 
#define FunctionBody   8
 
#define FunctionParamDefVal   9
 
#define ClassDec   10
 
#define ClassInheritance   11
 
#define ClassCaptureIndent   12
 
#define ClassBody   13
 
#define VariableDec   14
 
#define VariableEnd   15
 
#define VariableAtom   16
 
#define SingleQuoteString   17
 
#define DoubleQuoteString   18
 
#define TripleString   19
 
#define FromMod   20
 
#define FromModItem   21
 
#define Import   22
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( pyscannerYYtext, pyscannerYYleng, 1, pyscannerYYout )) {} } 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 pyscannerYYlex (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 pyscannerYYrestart (FILE *input_file)
 
void pyscannerYY_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE pyscannerYY_create_buffer (FILE *file, int size)
 
void pyscannerYY_delete_buffer (YY_BUFFER_STATE b)
 
void pyscannerYY_flush_buffer (YY_BUFFER_STATE b)
 
void pyscannerYYpush_buffer_state (YY_BUFFER_STATE new_buffer)
 
void pyscannerYYpop_buffer_state (void)
 
static void pyscannerYYensure_buffer_stack (void)
 
static void pyscannerYY_load_buffer_state (void)
 
static void pyscannerYY_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
YY_BUFFER_STATE pyscannerYY_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE pyscannerYY_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE pyscannerYY_scan_bytes (yyconst char *bytes, int len)
 
void * pyscannerYYalloc (yy_size_t)
 
void * pyscannerYYrealloc (void *, yy_size_t)
 
void pyscannerYYfree (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 QDict< QCStringg_packageNameCache (257)
 
static void initParser ()
 
static void initEntry ()
 
static void newEntry ()
 
static void newVariable ()
 
static void newFunction ()
 
static int computeIndent (const char *s)
 
static QCString findPackageScopeFromPath (const QCString &path)
 
static QCString findPackageScope (const char *fileName)
 
static void lineCount ()
 
static void incLineNr ()
 
static void startCommentBlock (bool brief)
 
static void handleCommentBlock (const QCString &doc, bool brief)
 
static void endOfDef (int correction=0)
 
static void addToString (const char *s)
 
static void initTriDoubleQuoteBlock ()
 
static void initTriSingleQuoteBlock ()
 
static void initSpecialBlock ()
 
static void searchFoundDef ()
 
static void searchFoundClass ()
 
static int yyread (char *buf, int max_size)
 
static int yy_init_globals (void)
 
int pyscannerYYlex_destroy (void)
 
int pyscannerYYget_debug (void)
 
void pyscannerYYset_debug (int debug_flag)
 
YY_EXTRA_TYPE pyscannerYYget_extra (void)
 
void pyscannerYYset_extra (YY_EXTRA_TYPE user_defined)
 
FILE * pyscannerYYget_in (void)
 
void pyscannerYYset_in (FILE *in_str)
 
FILE * pyscannerYYget_out (void)
 
void pyscannerYYset_out (FILE *out_str)
 
int pyscannerYYget_leng (void)
 
char * pyscannerYYget_text (void)
 
int pyscannerYYget_lineno (void)
 
void pyscannerYYset_lineno (int line_number)
 
static void yyunput (int c, char *buf_ptr)
 
int pyscannerYYlex (void)
 
 if (!(yy_init))
 
 while (1)
 
static void yyunput (int c, register char *yy_bp)
 
static void yy_fatal_error (yyconst char *msg)
 
static void parseCompounds (Entry *rt)
 
static void parseMain (const char *fileName, const char *fileBuf, Entry *rt)
 
static void parsePrototype (const QCString &text)
 
void pyscanFreeScanner ()
 

Variables

int pyscannerYYleng
 
FILE * pyscannerYYin = (FILE *) 0
 
FILE * pyscannerYYout = (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 pyscannerYYlineno = 1
 
char * pyscannerYYtext
 
static yyconst flex_int16_t yy_acclist [881]
 
static yyconst flex_int16_t yy_accept [497]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [53]
 
static yyconst flex_int16_t yy_base [603]
 
static yyconst flex_int16_t yy_def [603]
 
static yyconst flex_int16_t yy_nxt [2725]
 
static yyconst flex_int16_t yy_chk [2725]
 
int pyscannerYY_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 ParserInterfaceg_thisParser
 
static const char * inputString
 
static int inputPosition
 
static QFile inputFile
 
static Protection protection
 
static Entrycurrent_root = 0
 
static Entrycurrent = 0
 
static Entryprevious = 0
 
static EntrybodyEntry = 0
 
static int yyLineNr = 1
 
static QCString yyFileName
 
static MethodTypes mtype
 
static bool gstat
 
static Specifier virt
 
static int docBlockContext
 
static QCString docBlock
 
static bool docBlockInBody
 
static bool docBlockJavaStyle
 
static bool docBrief
 
static bool docBlockSpecial
 
static bool g_doubleQuote
 
static bool g_specialBlock
 
static int g_stringContext
 
static QGStringg_copyString
 
static int g_indent = 0
 
static int g_curIndent = 0
 
static char g_atomStart
 
static char g_atomEnd
 
static int g_atomCount
 
static QCString g_moduleScope
 
static QCString g_packageName
 
static QCString g_defVal
 
static int g_braceCount
 
static bool g_lexInit = FALSE
 
static bool g_packageCommentAllowed
 
static bool g_start_init = FALSE
 
static int g_search_count = 0
 
 YY_DECL
 
register char * yy_cp
 
register char * yy_bp
 
register int yy_act
 

Macro Definition Documentation

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 144 of file pyscanner.cpp.

#define ClassBody   13

Definition at line 1861 of file pyscanner.cpp.

#define ClassCaptureIndent   12

Definition at line 1860 of file pyscanner.cpp.

#define ClassDec   10

Definition at line 1858 of file pyscanner.cpp.

#define ClassInheritance   11

Definition at line 1859 of file pyscanner.cpp.

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

Definition at line 1424 of file pyscanner.cpp.

#define DoubleQuoteString   18

Definition at line 1866 of file pyscanner.cpp.

#define ECHO   do { if (fwrite( pyscannerYYtext, pyscannerYYleng, 1, pyscannerYYout )) {} } while (0)

Definition at line 1957 of file pyscanner.cpp.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 179 of file pyscanner.cpp.

#define EOB_ACT_END_OF_FILE   1

Definition at line 180 of file pyscanner.cpp.

#define EOB_ACT_LAST_MATCH   2

Definition at line 181 of file pyscanner.cpp.

#define FLEX_BETA

Definition at line 33 of file pyscanner.cpp.

#define FLEX_SCANNER

Definition at line 28 of file pyscanner.cpp.

#define FLEXINT_H

Definition at line 49 of file pyscanner.cpp.

#define FromMod   20

Definition at line 1868 of file pyscanner.cpp.

#define FromModItem   21

Definition at line 1869 of file pyscanner.cpp.

#define FunctionBody   8

Definition at line 1856 of file pyscanner.cpp.

#define FunctionDec   6

Definition at line 1854 of file pyscanner.cpp.

#define FunctionParamDefVal   9

Definition at line 1857 of file pyscanner.cpp.

#define FunctionParams   7

Definition at line 1855 of file pyscanner.cpp.

#define Import   22

Definition at line 1870 of file pyscanner.cpp.

#define INITIAL   0

Definition at line 1848 of file pyscanner.cpp.

#define INT16_MAX   (32767)

Definition at line 92 of file pyscanner.cpp.

#define INT16_MIN   (-32767-1)

Definition at line 83 of file pyscanner.cpp.

#define INT32_MAX   (2147483647)

Definition at line 95 of file pyscanner.cpp.

#define INT32_MIN   (-2147483647-1)

Definition at line 86 of file pyscanner.cpp.

#define INT8_MAX   (127)

Definition at line 89 of file pyscanner.cpp.

#define INT8_MIN   (-128)

Definition at line 80 of file pyscanner.cpp.

#define pyscannerYYwrap (   n)    1

Definition at line 354 of file pyscanner.cpp.

#define REJECT
Value:
{ \
*yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */ \
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 int yy_full_lp
Definition: pyscanner.cpp:1352
static char * yy_full_match
Definition: pyscanner.cpp:1349
register char * yy_cp
Definition: pyscanner.cpp:2050
static char yy_hold_char
Definition: pyscanner.cpp:292
static int yy_lp
Definition: pyscanner.cpp:1350
static yy_state_type * yy_state_ptr
Definition: pyscanner.cpp:1348
static int * yy_full_state
Definition: pyscanner.cpp:1353

Definition at line 1356 of file pyscanner.cpp.

#define Search   1

Definition at line 1849 of file pyscanner.cpp.

#define SearchMemVars   2

Definition at line 1850 of file pyscanner.cpp.

#define SingleQuoteString   17

Definition at line 1865 of file pyscanner.cpp.

#define SpecialComment   5

Definition at line 1853 of file pyscanner.cpp.

#define TripleComment   4

Definition at line 1852 of file pyscanner.cpp.

#define TripleString   19

Definition at line 1867 of file pyscanner.cpp.

#define TryClassDocString   3

Definition at line 1851 of file pyscanner.cpp.

#define UINT16_MAX   (65535U)

Definition at line 101 of file pyscanner.cpp.

#define UINT32_MAX   (4294967295U)

Definition at line 104 of file pyscanner.cpp.

#define UINT8_MAX   (255U)

Definition at line 98 of file pyscanner.cpp.

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

Definition at line 199 of file pyscanner.cpp.

#define VariableAtom   16

Definition at line 1864 of file pyscanner.cpp.

#define VariableDec   14

Definition at line 1862 of file pyscanner.cpp.

#define VariableEnd   15

Definition at line 1863 of file pyscanner.cpp.

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 350 of file pyscanner.cpp.

#define YY_BREAK   break;

Definition at line 2036 of file pyscanner.cpp.

#define YY_BUF_SIZE   16384

Definition at line 163 of file pyscanner.cpp.

#define YY_BUFFER_EOF_PENDING   2

Definition at line 266 of file pyscanner.cpp.

#define YY_BUFFER_NEW   0

Definition at line 254 of file pyscanner.cpp.

#define YY_BUFFER_NORMAL   1

Definition at line 255 of file pyscanner.cpp.

#define yy_create_buffer   pyscannerYY_create_buffer

Definition at line 9 of file pyscanner.cpp.

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

Definition at line 282 of file pyscanner.cpp.

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 289 of file pyscanner.cpp.

#define YY_DECL   int pyscannerYYlex (void)

Definition at line 2024 of file pyscanner.cpp.

#define YY_DECL_IS_OURS   1

Definition at line 2020 of file pyscanner.cpp.

#define yy_delete_buffer   pyscannerYY_delete_buffer

Definition at line 10 of file pyscanner.cpp.

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

Definition at line 378 of file pyscanner.cpp.

#define YY_END_OF_BUFFER   164

Definition at line 386 of file pyscanner.cpp.

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 159 of file pyscanner.cpp.

#define YY_EXIT_FAILURE   2

Definition at line 4618 of file pyscanner.cpp.

#define YY_EXTRA_TYPE   void *

Definition at line 1881 of file pyscanner.cpp.

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 2011 of file pyscanner.cpp.

#define yy_flex_debug   pyscannerYY_flex_debug

Definition at line 11 of file pyscanner.cpp.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 29 of file pyscanner.cpp.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 30 of file pyscanner.cpp.

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 31 of file pyscanner.cpp.

#define yy_flush_buffer   pyscannerYY_flush_buffer

Definition at line 13 of file pyscanner.cpp.

#define YY_FLUSH_BUFFER   pyscannerYY_flush_buffer(YY_CURRENT_BUFFER )

Definition at line 318 of file pyscanner.cpp.

#define yy_init_buffer   pyscannerYY_init_buffer

Definition at line 12 of file pyscanner.cpp.

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

Definition at line 1800 of file pyscanner.cpp.

#define YY_INT_ALIGNED   short int

Definition at line 5 of file pyscanner.cpp.

#define YY_LESS_LINENO (   n)

Definition at line 183 of file pyscanner.cpp.

#define yy_load_buffer_state   pyscannerYY_load_buffer_state

Definition at line 14 of file pyscanner.cpp.

#define YY_MORE_ADJ   0

Definition at line 1368 of file pyscanner.cpp.

#define yy_new_buffer   pyscannerYY_create_buffer

Definition at line 328 of file pyscanner.cpp.

#define YY_NEW_FILE   pyscannerYYrestart(pyscannerYYin )

Definition at line 157 of file pyscanner.cpp.

#define YY_NO_INPUT   1

Definition at line 1426 of file pyscanner.cpp.

#define YY_NO_UNISTD_H   1

Definition at line 1427 of file pyscanner.cpp.

#define YY_NULL   0

Definition at line 131 of file pyscanner.cpp.

#define YY_NUM_RULES   163

Definition at line 385 of file pyscanner.cpp.

#define YY_READ_BUF_SIZE   8192

Definition at line 1949 of file pyscanner.cpp.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 1369 of file pyscanner.cpp.

#define YY_RULE_SETUP
Value:
if ( pyscannerYYleng > 0 ) \
int pyscannerYYleng
Definition: pyscanner.cpp:294
char * pyscannerYYtext
Definition: pyscanner.cpp:1370
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
#define YY_USER_ACTION
Definition: pyscanner.cpp:2031

Definition at line 2039 of file pyscanner.cpp.

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

Definition at line 138 of file pyscanner.cpp.

#define yy_set_bol (   at_bol)
Value:
{ \
pyscannerYYensure_buffer_stack (); \
pyscannerYY_create_buffer(pyscannerYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
if(!(yy_init))
Definition: pyscanner.cpp:2060
#define YY_BUF_SIZE
Definition: pyscanner.cpp:163
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282

Definition at line 340 of file pyscanner.cpp.

#define yy_set_interactive (   is_interactive)
Value:
{ \
pyscannerYYensure_buffer_stack (); \
pyscannerYY_create_buffer(pyscannerYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
if(!(yy_init))
Definition: pyscanner.cpp:2060
#define YY_BUF_SIZE
Definition: pyscanner.cpp:163
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282

Definition at line 330 of file pyscanner.cpp.

#define YY_SKIP_YYWRAP

Definition at line 355 of file pyscanner.cpp.

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

Definition at line 150 of file pyscanner.cpp.

#define YY_START_STACK_INCR   25

Definition at line 2006 of file pyscanner.cpp.

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

Definition at line 168 of file pyscanner.cpp.

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

Definition at line 154 of file pyscanner.cpp.

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 207 of file pyscanner.cpp.

#define yy_switch_to_buffer   pyscannerYY_switch_to_buffer

Definition at line 15 of file pyscanner.cpp.

#define YY_TRAILING_HEAD_MASK   0x4000

Definition at line 1355 of file pyscanner.cpp.

#define YY_TRAILING_MASK   0x2000

Definition at line 1354 of file pyscanner.cpp.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 171 of file pyscanner.cpp.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 202 of file pyscanner.cpp.

#define YY_USER_ACTION

Definition at line 2031 of file pyscanner.cpp.

#define yyalloc   pyscannerYYalloc

Definition at line 24 of file pyscanner.cpp.

#define yyconst

Definition at line 127 of file pyscanner.cpp.

#define yyfree   pyscannerYYfree

Definition at line 26 of file pyscanner.cpp.

#define yyin   pyscannerYYin

Definition at line 16 of file pyscanner.cpp.

#define yyleng   pyscannerYYleng

Definition at line 17 of file pyscanner.cpp.

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

Definition at line 4630 of file pyscanner.cpp.

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

Definition at line 4630 of file pyscanner.cpp.

#define yylex   pyscannerYYlex

Definition at line 18 of file pyscanner.cpp.

#define yylineno   pyscannerYYlineno

Definition at line 19 of file pyscanner.cpp.

#define yymore ( )    yymore_used_but_not_detected

Definition at line 1367 of file pyscanner.cpp.

#define yyout   pyscannerYYout

Definition at line 20 of file pyscanner.cpp.

#define yyrealloc   pyscannerYYrealloc

Definition at line 25 of file pyscanner.cpp.

#define yyrestart   pyscannerYYrestart

Definition at line 21 of file pyscanner.cpp.

#define YYSTATE   YY_START

Definition at line 151 of file pyscanner.cpp.

#define YYTABLES_NAME   "yytables"

Definition at line 4828 of file pyscanner.cpp.

#define yyterminate ( )    return YY_NULL

Definition at line 2001 of file pyscanner.cpp.

#define yytext   pyscannerYYtext

Definition at line 22 of file pyscanner.cpp.

#define yytext_ptr   pyscannerYYtext

Definition at line 368 of file pyscanner.cpp.

#define yywrap   pyscannerYYwrap

Definition at line 23 of file pyscanner.cpp.

Typedef Documentation

typedef short int flex_int16_t

Definition at line 71 of file pyscanner.cpp.

typedef int flex_int32_t

Definition at line 72 of file pyscanner.cpp.

typedef signed char flex_int8_t

Definition at line 70 of file pyscanner.cpp.

typedef unsigned short int flex_uint16_t

Definition at line 74 of file pyscanner.cpp.

typedef unsigned int flex_uint32_t

Definition at line 75 of file pyscanner.cpp.

typedef unsigned char flex_uint8_t

Definition at line 73 of file pyscanner.cpp.

Definition at line 172 of file pyscanner.cpp.

typedef unsigned char YY_CHAR

Definition at line 357 of file pyscanner.cpp.

typedef size_t yy_size_t

Definition at line 203 of file pyscanner.cpp.

typedef int yy_state_type

Definition at line 361 of file pyscanner.cpp.

Function Documentation

static void addToString ( const char *  s)
inlinestatic

Definition at line 1730 of file pyscanner.cpp.

1731 {
1732  if (g_copyString) (*g_copyString)+=s;
1733 }
static QGString * g_copyString
Definition: pyscanner.cpp:1462
static QCString * s
Definition: config.cpp:1042
static int computeIndent ( const char *  s)
inlinestatic

Definition at line 1550 of file pyscanner.cpp.

1551 {
1552  int col=0;
1553  static int tabSize=Config_getInt("TAB_SIZE");
1554  const char *p=s;
1555  char c;
1556  while ((c=*p++))
1557  {
1558  if (c==' ') col++;
1559  else if (c=='\t') col+=tabSize-(col%tabSize);
1560  else break;
1561  }
1562  return col;
1563 }
#define Config_getInt(val)
Definition: config.cpp:661
p
Definition: test.py:223
static QCString * s
Definition: config.cpp:1042
static void endOfDef ( int  correction = 0)
static

Definition at line 1718 of file pyscanner.cpp.

1719 {
1720  //printf("endOfDef at=%d\n",yyLineNr);
1721  if (bodyEntry)
1722  {
1723  bodyEntry->endBodyLine = yyLineNr-correction;
1724  bodyEntry = 0;
1725  }
1726  newEntry();
1727  //g_insideConstructor = FALSE;
1728 }
int endBodyLine
line number where the definition ends
Definition: entry.h:277
static int yyLineNr
Definition: pyscanner.cpp:1446
static Entry * bodyEntry
Definition: pyscanner.cpp:1445
static void newEntry()
Definition: pyscanner.cpp:1515
static QCString findPackageScope ( const char *  fileName)
static

Definition at line 1591 of file pyscanner.cpp.

1592 {
1593  if (fileName==0) return "";
1594  QFileInfo fi(fileName);
1595  return findPackageScopeFromPath(fi.dirPath(TRUE).data());
1596 }
fileName
Definition: dumpTree.py:9
static QCString findPackageScopeFromPath(const QCString &path)
Definition: pyscanner.cpp:1565
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
const bool TRUE
Definition: qglobal.h:371
static QCString findPackageScopeFromPath ( const QCString path)
static

Definition at line 1565 of file pyscanner.cpp.

1566 {
1567  QCString *pScope = g_packageNameCache.find(path);
1568  if (pScope)
1569  {
1570  return *pScope;
1571  }
1572  QFileInfo pf(path+"/__init__.py"); // found package initialization file
1573  if (pf.exists())
1574  {
1575  int i=path.findRev('/');
1576  if (i!=-1)
1577  {
1579  if (!scope.isEmpty())
1580  {
1581  scope+="::";
1582  }
1583  scope+=path.mid(i+1);
1584  g_packageNameCache.insert(path,new QCString(scope));
1585  return scope;
1586  }
1587  }
1588  return "";
1589 }
static QCString scope
Definition: declinfo.cpp:668
bool isEmpty() const
Definition: qcstring.h:189
QCString left(uint len) const
Definition: qcstring.cpp:213
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
static QCString findPackageScopeFromPath(const QCString &path)
Definition: pyscanner.cpp:1565
static QDict< QCString > g_packageNameCache(257)
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
static QDict<QCString> g_packageNameCache ( 257  )
static
static void handleCommentBlock ( const QCString doc,
bool  brief 
)
static

Definition at line 1676 of file pyscanner.cpp.

1677 {
1678  //printf("handleCommentBlock(doc=[%s] brief=%d docBlockInBody=%d docBlockJavaStyle=%d\n",
1679  // doc.data(),brief,docBlockInBody,docBlockJavaStyle);
1680 
1681  // TODO: Fix me
1683 
1684  if (docBlockInBody && previous && !previous->doc.isEmpty())
1685  {
1687  }
1688 
1689  int position = 0;
1690  bool needsEntry;
1691  int lineNr = brief ? current->briefLine : current->docLine;
1692  while (parseCommentBlock(
1693  g_thisParser,
1695  doc, // text
1696  yyFileName, // file
1697  lineNr,
1698  docBlockInBody ? FALSE : brief,
1699  docBlockJavaStyle, // javadoc style // or FALSE,
1701  protection,
1702  position,
1703  needsEntry)
1704  ) // need to start a new entry
1705  {
1706  if (needsEntry)
1707  {
1708  newEntry();
1709  }
1710  }
1711  if (needsEntry)
1712  {
1713  newEntry();
1714  }
1715 
1716 }
static Protection protection
Definition: pyscanner.cpp:1440
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool brief
bool isEmpty() const
Definition: qcstring.h:189
static bool docBlockInBody
Definition: pyscanner.cpp:1454
int briefLine
line number at which the brief desc. was found
Definition: entry.h:264
int docLine
line number at which the documentation was found
Definition: entry.h:261
const bool FALSE
Definition: qglobal.h:370
static Entry * previous
Definition: pyscanner.cpp:1444
static QCString yyFileName
Definition: pyscanner.cpp:1447
static bool docBlockJavaStyle
Definition: pyscanner.cpp:1455
QCString doc
documentation block (partly parsed)
Definition: entry.h:260
bool parseCommentBlock(ParserInterface *parser, Entry *curEntry, const QCString &comment, const QCString &fileName, int &lineNr, bool isBrief, bool isAutoBriefOn, bool isInbody, Protection &prot, int &position, bool &newEntryNeeded)
static Entry * current
Definition: pyscanner.cpp:1443
static ParserInterface * g_thisParser
Definition: pyscanner.cpp:1435
static void newEntry()
Definition: pyscanner.cpp:1515
if ( yy_init)

Definition at line 2060 of file pyscanner.cpp.

2061  {
2062  (yy_init) = 1;
2063 
2064 #ifdef YY_USER_INIT
2065  YY_USER_INIT;
2066 #endif
2067 
2068  /* Create the reject buffer large enough to save one state per allowed character. */
2069  if ( ! (yy_state_buf) )
2071  if ( ! (yy_state_buf) )
2072  YY_FATAL_ERROR( "out of dynamic memory in pyscannerYYlex()" );
2073 
2074  if ( ! (yy_start) )
2075  (yy_start) = 1; /* first start state */
2076 
2077  if ( ! pyscannerYYin )
2078  pyscannerYYin = stdin;
2079 
2080  if ( ! pyscannerYYout )
2082 
2083  if ( ! YY_CURRENT_BUFFER ) {
2087  }
2088 
2090  }
#define YY_FATAL_ERROR(msg)
Definition: pyscanner.cpp:2011
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
static int yy_init
Definition: pyscanner.cpp:298
FILE * pyscannerYYout
Definition: pyscanner.cpp:359
int yy_state_type
Definition: code.cpp:361
#define YY_BUF_SIZE
Definition: pyscanner.cpp:163
YY_BUFFER_STATE pyscannerYY_create_buffer(FILE *file, int size)
Definition: pyscanner.cpp:4335
static void pyscannerYY_load_buffer_state(void)
Definition: pyscanner.cpp:4321
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
static yy_state_type * yy_state_buf
Definition: pyscanner.cpp:1348
static void pyscannerYYensure_buffer_stack(void)
Definition: pyscanner.cpp:4488
void * pyscannerYYalloc(yy_size_t)
Definition: pyscanner.cpp:4806
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
static int yy_start
Definition: pyscanner.cpp:299
#define YY_STATE_BUF_SIZE
Definition: pyscanner.cpp:168
static void incLineNr ( )
static

Definition at line 1609 of file pyscanner.cpp.

1610 {
1611  DBG_CTX((stderr,"yyLineNr=%d\n",yyLineNr));
1612  yyLineNr++;
1613 }
#define DBG_CTX(x)
Definition: pyscanner.cpp:1424
static int yyLineNr
Definition: pyscanner.cpp:1446
static void initEntry ( )
static

Definition at line 1502 of file pyscanner.cpp.

1503 {
1504  //current->python = TRUE;
1506  current->mtype = mtype;
1507  current->virt = virt;
1508  current->stat = gstat;
1512  gstat = FALSE;
1513 }
void setParent(Entry *parent)
Definition: entry.h:202
static Protection protection
Definition: pyscanner.cpp:1440
bool stat
static ?
Definition: entry.h:245
static MethodTypes mtype
Definition: pyscanner.cpp:1448
const bool FALSE
Definition: qglobal.h:370
static Entry * current_root
Definition: pyscanner.cpp:1442
Protection protection
class protection
Definition: entry.h:241
void initGroupInfo(Entry *e)
Specifier virt
virtualness of the entry
Definition: entry.h:251
static Entry * current
Definition: pyscanner.cpp:1443
MethodTypes mtype
signal, slot, (dcop) method, or property?
Definition: entry.h:242
static Specifier virt
Definition: pyscanner.cpp:1450
static bool gstat
Definition: pyscanner.cpp:1449
SrcLangExt lang
programming language in which this entry was found
Definition: entry.h:286
static void initParser ( )
static

Definition at line 1491 of file pyscanner.cpp.

1492 {
1493  protection = Public;
1494  mtype = Method;
1495  gstat = FALSE;
1496  virt = Normal;
1497  previous = 0;
1499  g_packageNameCache.setAutoDelete(TRUE);
1500 }
static Protection protection
Definition: pyscanner.cpp:1440
static MethodTypes mtype
Definition: pyscanner.cpp:1448
static bool g_packageCommentAllowed
Definition: pyscanner.cpp:1483
Definition: types.h:26
const bool FALSE
Definition: qglobal.h:370
Definition: types.h:29
static Entry * previous
Definition: pyscanner.cpp:1444
Definition: types.h:32
static Specifier virt
Definition: pyscanner.cpp:1450
static bool gstat
Definition: pyscanner.cpp:1449
static QDict< QCString > g_packageNameCache(257)
const bool TRUE
Definition: qglobal.h:371
static void initSpecialBlock ( )
static

Definition at line 1757 of file pyscanner.cpp.

1758 {
1762  docBrief = TRUE;
1763  docBlock.resize(0);
1765 }
bool resize(uint newlen)
Definition: qcstring.h:225
static bool docBrief
Definition: pyscanner.cpp:1456
static bool docBlockInBody
Definition: pyscanner.cpp:1454
const bool FALSE
Definition: qglobal.h:370
static void startCommentBlock(bool brief)
Definition: pyscanner.cpp:1653
static bool docBlockJavaStyle
Definition: pyscanner.cpp:1455
#define YY_START
Definition: pyscanner.cpp:150
static QCString docBlock
Definition: pyscanner.cpp:1453
static int docBlockContext
Definition: pyscanner.cpp:1452
const bool TRUE
Definition: qglobal.h:371
static void initTriDoubleQuoteBlock ( )
static

Definition at line 1735 of file pyscanner.cpp.

1736 {
1740  docBlockSpecial = pyscannerYYtext[3]=='!';
1741  docBlock.resize(0);
1742  g_doubleQuote = TRUE;
1744 }
bool resize(uint newlen)
Definition: qcstring.h:225
static bool docBlockInBody
Definition: pyscanner.cpp:1454
const bool FALSE
Definition: qglobal.h:370
char * pyscannerYYtext
Definition: pyscanner.cpp:1370
static void startCommentBlock(bool brief)
Definition: pyscanner.cpp:1653
static bool docBlockSpecial
Definition: pyscanner.cpp:1457
static bool docBlockJavaStyle
Definition: pyscanner.cpp:1455
#define YY_START
Definition: pyscanner.cpp:150
static QCString docBlock
Definition: pyscanner.cpp:1453
static bool g_doubleQuote
Definition: pyscanner.cpp:1459
static int docBlockContext
Definition: pyscanner.cpp:1452
const bool TRUE
Definition: qglobal.h:371
static void initTriSingleQuoteBlock ( )
static

Definition at line 1746 of file pyscanner.cpp.

1747 {
1751  docBlockSpecial = pyscannerYYtext[3]=='!';
1752  docBlock.resize(0);
1753  g_doubleQuote = FALSE;
1755 }
bool resize(uint newlen)
Definition: qcstring.h:225
static bool docBlockInBody
Definition: pyscanner.cpp:1454
const bool FALSE
Definition: qglobal.h:370
char * pyscannerYYtext
Definition: pyscanner.cpp:1370
static void startCommentBlock(bool brief)
Definition: pyscanner.cpp:1653
static bool docBlockSpecial
Definition: pyscanner.cpp:1457
static bool docBlockJavaStyle
Definition: pyscanner.cpp:1455
#define YY_START
Definition: pyscanner.cpp:150
static QCString docBlock
Definition: pyscanner.cpp:1453
static bool g_doubleQuote
Definition: pyscanner.cpp:1459
static int docBlockContext
Definition: pyscanner.cpp:1452
const bool TRUE
Definition: qglobal.h:371
static void lineCount ( )
static

Definition at line 1600 of file pyscanner.cpp.

1601 {
1602  DBG_CTX((stderr,"yyLineNr=%d\n",yyLineNr));
1603  for (const char *p = pyscannerYYtext; *p; ++p)
1604  {
1605  yyLineNr += (*p == '\n') ;
1606  }
1607 }
char * pyscannerYYtext
Definition: pyscanner.cpp:1370
p
Definition: test.py:223
#define DBG_CTX(x)
Definition: pyscanner.cpp:1424
static int yyLineNr
Definition: pyscanner.cpp:1446
static void newEntry ( )
static

Definition at line 1515 of file pyscanner.cpp.

1516 {
1517  previous = current;
1519  current = new Entry ;
1520  initEntry();
1521 }
Definition: entry.h:63
void addSubEntry(Entry *e)
Definition: entry.cpp:206
static void initEntry()
Definition: pyscanner.cpp:1502
static Entry * previous
Definition: pyscanner.cpp:1444
static Entry * current_root
Definition: pyscanner.cpp:1442
static Entry * current
Definition: pyscanner.cpp:1443
static void newFunction ( )
static

Definition at line 1536 of file pyscanner.cpp.

1537 {
1538  if (current->name.left(2)=="__" && current->name.right(2)=="__")
1539  {
1540  // special method name, see
1541  // http://docs.python.org/ref/specialnames.html
1543  }
1544  else if (current->name.at(0)=='_')
1545  {
1547  }
1548 }
Definition: types.h:26
char & at(uint i) const
Definition: qcstring.h:326
Definition: types.h:26
QCString name
member name
Definition: entry.h:237
QCString left(uint len) const
Definition: qcstring.cpp:213
QCString right(uint len) const
Definition: qcstring.cpp:231
Protection protection
class protection
Definition: entry.h:241
static Entry * current
Definition: pyscanner.cpp:1443
static void newVariable ( )
static

Definition at line 1523 of file pyscanner.cpp.

1524 {
1525  if (!current->name.isEmpty() && current->name.at(0)=='_') // mark as private
1526  {
1528  }
1529  if (current_root->section&Entry::COMPOUND_MASK) // mark as class variable
1530  {
1531  current->stat = TRUE;
1532  }
1533  newEntry();
1534 }
bool stat
static ?
Definition: entry.h:245
bool isEmpty() const
Definition: qcstring.h:189
char & at(uint i) const
Definition: qcstring.h:326
Definition: types.h:26
QCString name
member name
Definition: entry.h:237
static Entry * current_root
Definition: pyscanner.cpp:1442
Protection protection
class protection
Definition: entry.h:241
static Entry * current
Definition: pyscanner.cpp:1443
const bool TRUE
Definition: qglobal.h:371
static void newEntry()
Definition: pyscanner.cpp:1515
int section
entry type (see Sections);
Definition: entry.h:235
static void parseCompounds ( Entry rt)
static

Definition at line 4836 of file pyscanner.cpp.

4837 {
4838  //printf("parseCompounds(%s)\n",rt->name.data());
4839  EntryListIterator eli(*rt->children());
4840  Entry *ce;
4841  for (;(ce=eli.current());++eli)
4842  {
4843  if (!ce->program.isEmpty())
4844  {
4845  //printf("-- %s ---------\n%s\n---------------\n",
4846  // ce->name.data(),ce->program.data());
4847  // init scanner state
4848  inputString = ce->program;
4849  inputPosition = 0;
4851  if (ce->section&Entry::COMPOUND_MASK)
4852  {
4853  current_root = ce ;
4854  BEGIN( Search );
4855  }
4856  else if (ce->parent())
4857  {
4858  current_root = ce->parent();
4859  //printf("Searching for member variables in %s parent=%s\n",
4860  // ce->name.data(),ce->parent->name.data());
4861  BEGIN( SearchMemVars );
4862  }
4863  yyFileName = ce->fileName;
4864  yyLineNr = ce->bodyLine ;
4865  if (current) delete current;
4866  current = new Entry;
4867  initEntry();
4868 
4870 
4871  pyscannerYYlex() ;
4872  g_lexInit=TRUE;
4873  delete current; current=0;
4874  ce->program.resize(0);
4875 
4877 
4878  }
4879  parseCompounds(ce);
4880  }
4881 }
QGString program
the program text
Definition: entry.h:256
static int inputPosition
Definition: pyscanner.cpp:1437
void pyscannerYYrestart(FILE *input_file)
Definition: pyscanner.cpp:4273
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
Definition: entry.h:63
void groupEnterCompound(const char *fileName, int line, const char *name)
bool resize(uint newlen)
Definition: qgstring.cpp:96
static void initEntry()
Definition: pyscanner.cpp:1502
Entry * parent() const
Definition: entry.h:205
#define Search
Definition: pyscanner.cpp:1849
static const char * inputString
Definition: pyscanner.cpp:1436
const QList< Entry > * children() const
Definition: entry.h:210
static QCString yyFileName
Definition: pyscanner.cpp:1447
#define SearchMemVars
Definition: pyscanner.cpp:1850
static Entry * current_root
Definition: pyscanner.cpp:1442
static int yyLineNr
Definition: pyscanner.cpp:1446
static void parseCompounds(Entry *rt)
Definition: pyscanner.cpp:4836
static Entry * current
Definition: pyscanner.cpp:1443
void groupLeaveCompound(const char *, int, const char *)
#define BEGIN
Definition: pyscanner.cpp:144
int pyscannerYYlex(void)
static bool g_lexInit
Definition: pyscanner.cpp:1482
const bool TRUE
Definition: qglobal.h:371
static void parseMain ( const char *  fileName,
const char *  fileBuf,
Entry rt 
)
static

Definition at line 4886 of file pyscanner.cpp.

4887 {
4888  initParser();
4889 
4890  inputString = fileBuf;
4891  inputPosition = 0;
4892 
4893  protection = Public;
4894  mtype = Method;
4895  gstat = FALSE;
4896  virt = Normal;
4897  current_root = rt;
4899 
4900 
4902  if (inputFile.open(IO_ReadOnly))
4903  {
4904  yyLineNr= 1 ;
4905  yyFileName = fileName;
4906  //setContext();
4907  msg("Parsing file %s...\n",yyFileName.data());
4908 
4909  QFileInfo fi(fileName);
4911  QCString baseName=fi.baseName().utf8();
4912  if (baseName!="__init__") // package initializer file is not a package itself
4913  {
4914  if (!g_moduleScope.isEmpty())
4915  {
4916  g_moduleScope+="::";
4917  }
4919  }
4920 
4921  current = new Entry;
4922  initEntry();
4925  current->type = "namespace";
4929 
4930  rt->addSubEntry(current);
4931 
4932  current_root = current ;
4933  initParser();
4934  current = new Entry;
4935 
4937 
4938  current->reset();
4939  initEntry();
4941  BEGIN( Search );
4942  pyscannerYYlex();
4943  g_lexInit=TRUE;
4944 
4946 
4948  delete current; current=0;
4949 
4951 
4952  inputFile.close();
4953  }
4954 
4955 }
QGString program
the program text
Definition: entry.h:256
static int inputPosition
Definition: pyscanner.cpp:1437
static Protection protection
Definition: pyscanner.cpp:1440
void reset()
Definition: entry.cpp:217
void pyscannerYYrestart(FILE *input_file)
Definition: pyscanner.cpp:4273
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
bool isEmpty() const
Definition: qcstring.h:189
void msg(const char *fmt,...)
Definition: message.cpp:107
static MethodTypes mtype
Definition: pyscanner.cpp:1448
Definition: entry.h:63
Definition: types.h:26
const bool FALSE
Definition: qglobal.h:370
void addSubEntry(Entry *e)
Definition: entry.cpp:206
QCString name
member name
Definition: entry.h:237
bool resize(uint newlen)
Definition: qgstring.cpp:96
static void initEntry()
Definition: pyscanner.cpp:1502
void setName(const QString &name)
Definition: qfile.cpp:167
static void initParser()
Definition: pyscanner.cpp:1491
Definition: types.h:29
static QFile inputFile
Definition: pyscanner.cpp:1438
#define IO_ReadOnly
Definition: qiodevice.h:61
#define Search
Definition: pyscanner.cpp:1849
static const char * inputString
Definition: pyscanner.cpp:1436
void groupEnterFile(const char *fileName, int)
fileName
Definition: dumpTree.py:9
Definition: types.h:32
bool open(int)
Definition: qfile_unix.cpp:134
static QCString yyFileName
Definition: pyscanner.cpp:1447
int startLine
start line of entry in the source
Definition: entry.h:283
const char * data() const
Definition: qcstring.h:207
static Entry * current_root
Definition: pyscanner.cpp:1442
static QCString findPackageScope(const char *fileName)
Definition: pyscanner.cpp:1591
static bool g_specialBlock
Definition: pyscanner.cpp:1460
static QCString g_moduleScope
Definition: pyscanner.cpp:1474
static int yyLineNr
Definition: pyscanner.cpp:1446
static void parseCompounds(Entry *rt)
Definition: pyscanner.cpp:4836
static Entry * current
Definition: pyscanner.cpp:1443
QCString fileName
file this entry was extracted from
Definition: entry.h:282
#define BEGIN
Definition: pyscanner.cpp:144
void groupLeaveFile(const char *fileName, int line)
int pyscannerYYlex(void)
static Specifier virt
Definition: pyscanner.cpp:1450
static QCString baseName
Definition: scanner.cpp:10890
static bool gstat
Definition: pyscanner.cpp:1449
static bool g_lexInit
Definition: pyscanner.cpp:1482
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
void close()
Definition: qfile_unix.cpp:614
const bool TRUE
Definition: qglobal.h:371
QCString type
member type
Definition: entry.h:236
int section
entry type (see Sections);
Definition: entry.h:235
int bodyLine
line number of the definition in the source
Definition: entry.h:276
static void parsePrototype ( const QCString text)
static

Definition at line 4959 of file pyscanner.cpp.

4960 {
4961  //printf("**** parsePrototype(%s) begin\n",text.data());
4962  if (text.isEmpty())
4963  {
4964  warn(yyFileName,yyLineNr,"Empty prototype found!");
4965  return;
4966  }
4967 
4970 
4971  const char *orgInputString;
4972  int orgInputPosition;
4973  YY_BUFFER_STATE orgState;
4974 
4975  // save scanner state
4976  orgState = YY_CURRENT_BUFFER;
4978  orgInputString = inputString;
4979  orgInputPosition = inputPosition;
4980 
4981  // set new string
4982  inputString = text;
4983  inputPosition = 0;
4985 
4986  BEGIN( FunctionDec );
4987 
4988  pyscannerYYlex();
4989  g_lexInit=TRUE;
4990 
4994 
4995  // restore original scanner state
4996 
4998  pyscannerYY_switch_to_buffer(orgState);
4999  pyscannerYY_delete_buffer(tmpBuf);
5000 
5001  inputString = orgInputString;
5002  inputPosition = orgInputPosition;
5003 
5004  //printf("**** parsePrototype end\n");
5005 }
static int inputPosition
Definition: pyscanner.cpp:1437
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
void pyscannerYYrestart(FILE *input_file)
Definition: pyscanner.cpp:4273
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
bool isEmpty() const
Definition: qcstring.h:189
static bool g_packageCommentAllowed
Definition: pyscanner.cpp:1483
const bool FALSE
Definition: qglobal.h:370
void pyscannerYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Definition: pyscanner.cpp:4290
QCString name
member name
Definition: entry.h:237
#define FunctionDec
Definition: pyscanner.cpp:1854
static const char * inputString
Definition: pyscanner.cpp:1436
#define YY_BUF_SIZE
Definition: pyscanner.cpp:163
YY_BUFFER_STATE pyscannerYY_create_buffer(FILE *file, int size)
Definition: pyscanner.cpp:4335
static QCString yyFileName
Definition: pyscanner.cpp:1447
QCString args
member argument string
Definition: entry.h:252
void warn(const char *file, int line, const char *fmt,...)
Definition: message.cpp:183
static bool g_specialBlock
Definition: pyscanner.cpp:1460
static int yyLineNr
Definition: pyscanner.cpp:1446
void pyscannerYY_delete_buffer(YY_BUFFER_STATE b)
Definition: pyscanner.cpp:4363
static Entry * current
Definition: pyscanner.cpp:1443
#define BEGIN
Definition: pyscanner.cpp:144
int pyscannerYYlex(void)
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
static bool g_lexInit
Definition: pyscanner.cpp:1482
const bool TRUE
Definition: qglobal.h:371
int section
entry type (see Sections);
Definition: entry.h:235
void pyscanFreeScanner ( )

Definition at line 5007 of file pyscanner.cpp.

5008 {
5009 #if defined(YY_FLEX_SUBMINOR_VERSION)
5010  if (g_lexInit)
5011  {
5013  }
5014 #endif
5015 }
int pyscannerYYlex_destroy(void)
Definition: pyscanner.cpp:4758
static bool g_lexInit
Definition: pyscanner.cpp:1482
YY_BUFFER_STATE pyscannerYY_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 4335 of file pyscanner.cpp.

4336 {
4338 
4339  b = (YY_BUFFER_STATE) pyscannerYYalloc(sizeof( struct yy_buffer_state ) );
4340  if ( ! b )
4341  YY_FATAL_ERROR( "out of dynamic memory in pyscannerYY_create_buffer()" );
4342 
4343  b->yy_buf_size = size;
4344 
4345  /* yy_ch_buf has to be 2 characters longer than the size given because
4346  * we need to put in 2 end-of-buffer characters.
4347  */
4348  b->yy_ch_buf = (char *) pyscannerYYalloc(b->yy_buf_size + 2 );
4349  if ( ! b->yy_ch_buf )
4350  YY_FATAL_ERROR( "out of dynamic memory in pyscannerYY_create_buffer()" );
4351 
4352  b->yy_is_our_buffer = 1;
4353 
4355 
4356  return b;
4357 }
#define YY_FATAL_ERROR(msg)
Definition: pyscanner.cpp:2011
struct yy_buffer_state * YY_BUFFER_STATE
Definition: pyscanner.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
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
static void pyscannerYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: pyscanner.cpp:4382
void * pyscannerYYalloc(yy_size_t)
Definition: pyscanner.cpp:4806
static bool * b
Definition: config.cpp:1043
void pyscannerYY_delete_buffer ( YY_BUFFER_STATE  b)

Destroy the buffer.

Parameters
ba buffer created with pyscannerYY_create_buffer()

Definition at line 4363 of file pyscanner.cpp.

4364 {
4365 
4366  if ( ! b )
4367  return;
4368 
4369  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
4371 
4372  if ( b->yy_is_our_buffer )
4373  pyscannerYYfree((void *) b->yy_ch_buf );
4374 
4375  pyscannerYYfree((void *) b );
4376 }
struct yy_buffer_state * YY_BUFFER_STATE
Definition: pyscanner.cpp:172
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
void pyscannerYYfree(void *)
Definition: pyscanner.cpp:4823
void pyscannerYY_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 4410 of file pyscanner.cpp.

4411 {
4412  if ( ! b )
4413  return;
4414 
4415  b->yy_n_chars = 0;
4416 
4417  /* We always need two end-of-buffer characters. The first causes
4418  * a transition to the end-of-buffer state. The second causes
4419  * a jam in that state.
4420  */
4423 
4424  b->yy_buf_pos = &b->yy_ch_buf[0];
4425 
4426  b->yy_at_bol = 1;
4428 
4429  if ( b == YY_CURRENT_BUFFER )
4431 }
char * yy_buf_pos
Definition: code.cpp:213
int yy_n_chars
Definition: code.cpp:223
#define YY_BUFFER_NEW
Definition: pyscanner.cpp:254
#define YY_END_OF_BUFFER_CHAR
Definition: pyscanner.cpp:159
static void pyscannerYY_load_buffer_state(void)
Definition: pyscanner.cpp:4321
char * yy_ch_buf
Definition: code.cpp:212
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
int yy_buffer_status
Definition: code.cpp:252
static void pyscannerYY_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)
static

Definition at line 4382 of file pyscanner.cpp.

4384 {
4385  int oerrno = errno;
4386 
4388 
4389  b->yy_input_file = file;
4390  b->yy_fill_buffer = 1;
4391 
4392  /* If b is the current buffer, then pyscannerYY_init_buffer was _probably_
4393  * called from pyscannerYYrestart() or through yy_get_next_buffer.
4394  * In that case, we don't want to reset the lineno or column.
4395  */
4396  if (b != YY_CURRENT_BUFFER){
4397  b->yy_bs_lineno = 1;
4398  b->yy_bs_column = 0;
4399  }
4400 
4401  b->yy_is_interactive = 0;
4402 
4403  errno = oerrno;
4404 }
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
void pyscannerYY_flush_buffer(YY_BUFFER_STATE b)
Definition: pyscanner.cpp:4410
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
int yy_is_interactive
Definition: code.cpp:236
static void pyscannerYY_load_buffer_state ( void  )
static

Definition at line 4321 of file pyscanner.cpp.

4322 {
4323  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
4324  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
4325  pyscannerYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
4326  (yy_hold_char) = *(yy_c_buf_p);
4327 }
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
static char yy_hold_char
Definition: pyscanner.cpp:292
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
#define yytext_ptr
Definition: pyscanner.cpp:368
static char * yy_c_buf_p
Definition: pyscanner.cpp:297
static int yy_n_chars
Definition: pyscanner.cpp:293
YY_BUFFER_STATE pyscannerYY_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 4537 of file pyscanner.cpp.

4538 {
4540 
4541  if ( size < 2 ||
4544  /* They forgot to leave room for the EOB's. */
4545  return 0;
4546 
4547  b = (YY_BUFFER_STATE) pyscannerYYalloc(sizeof( struct yy_buffer_state ) );
4548  if ( ! b )
4549  YY_FATAL_ERROR( "out of dynamic memory in pyscannerYY_scan_buffer()" );
4550 
4551  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
4552  b->yy_buf_pos = b->yy_ch_buf = base;
4553  b->yy_is_our_buffer = 0;
4554  b->yy_input_file = 0;
4555  b->yy_n_chars = b->yy_buf_size;
4556  b->yy_is_interactive = 0;
4557  b->yy_at_bol = 1;
4558  b->yy_fill_buffer = 0;
4560 
4562 
4563  return b;
4564 }
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: pyscanner.cpp:2011
#define YY_BUFFER_NEW
Definition: pyscanner.cpp:254
int yy_fill_buffer
Definition: code.cpp:250
struct yy_buffer_state * YY_BUFFER_STATE
Definition: pyscanner.cpp:172
void pyscannerYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Definition: pyscanner.cpp:4290
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
#define YY_END_OF_BUFFER_CHAR
Definition: pyscanner.cpp:159
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
void * pyscannerYYalloc(yy_size_t)
Definition: pyscanner.cpp:4806
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 pyscannerYY_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len 
)

Setup the input buffer state to scan the given bytes. The next call to pyscannerYYlex() 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 4587 of file pyscanner.cpp.

4588 {
4590  char *buf;
4591  yy_size_t n;
4592  int i;
4593 
4594  /* Get memory for full buffer, including space for trailing EOB's. */
4595  n = _yybytes_len + 2;
4596  buf = (char *) pyscannerYYalloc(n );
4597  if ( ! buf )
4598  YY_FATAL_ERROR( "out of dynamic memory in pyscannerYY_scan_bytes()" );
4599 
4600  for ( i = 0; i < _yybytes_len; ++i )
4601  buf[i] = yybytes[i];
4602 
4603  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
4604 
4605  b = pyscannerYY_scan_buffer(buf,n );
4606  if ( ! b )
4607  YY_FATAL_ERROR( "bad buffer in pyscannerYY_scan_bytes()" );
4608 
4609  /* It's okay to grow etc. this buffer, and we should throw it
4610  * away when we're done.
4611  */
4612  b->yy_is_our_buffer = 1;
4613 
4614  return b;
4615 }
#define YY_FATAL_ERROR(msg)
Definition: pyscanner.cpp:2011
YY_BUFFER_STATE pyscannerYY_scan_buffer(char *base, yy_size_t size)
Definition: pyscanner.cpp:4537
#define YY_END_OF_BUFFER_CHAR
Definition: pyscanner.cpp:159
std::void_t< T > n
int yy_is_our_buffer
Definition: code.cpp:229
void * pyscannerYYalloc(yy_size_t)
Definition: pyscanner.cpp:4806
static bool * b
Definition: config.cpp:1043
size_t yy_size_t
Definition: code.cpp:203
YY_BUFFER_STATE pyscannerYY_scan_string ( yyconst char *  yystr)

Setup the input buffer state to scan a string. The next call to pyscannerYYlex() 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 pyscannerYY_scan_bytes() instead.

Definition at line 4574 of file pyscanner.cpp.

4575 {
4576 
4577  return pyscannerYY_scan_bytes(yystr,strlen(yystr) );
4578 }
YY_BUFFER_STATE pyscannerYY_scan_bytes(yyconst char *bytes, int len)
Definition: pyscanner.cpp:4587
void pyscannerYY_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Definition at line 4290 of file pyscanner.cpp.

4291 {
4292 
4293  /* TODO. We should be able to replace this entire function body
4294  * with
4295  * pyscannerYYpop_buffer_state();
4296  * pyscannerYYpush_buffer_state(new_buffer);
4297  */
4299  if ( YY_CURRENT_BUFFER == new_buffer )
4300  return;
4301 
4302  if ( YY_CURRENT_BUFFER )
4303  {
4304  /* Flush out information for old buffer. */
4305  *(yy_c_buf_p) = (yy_hold_char);
4306  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
4307  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4308  }
4309 
4310  YY_CURRENT_BUFFER_LVALUE = new_buffer;
4312 
4313  /* We don't actually know whether we did this switch during
4314  * EOF (pyscannerYYwrap()) processing, but the only time this flag
4315  * is looked at is after pyscannerYYwrap() is called, so it's safe
4316  * to go ahead and always set it.
4317  */
4319 }
static char yy_hold_char
Definition: pyscanner.cpp:292
static void pyscannerYY_load_buffer_state(void)
Definition: pyscanner.cpp:4321
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
static void pyscannerYYensure_buffer_stack(void)
Definition: pyscanner.cpp:4488
static char * yy_c_buf_p
Definition: pyscanner.cpp:297
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
static int yy_did_buffer_switch_on_eof
Definition: pyscanner.cpp:304
static int yy_n_chars
Definition: pyscanner.cpp:293
void * pyscannerYYalloc ( yy_size_t  size)

Definition at line 4806 of file pyscanner.cpp.

4807 {
4808  return (void *) malloc( size );
4809 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
static void pyscannerYYensure_buffer_stack ( void  )
static

Definition at line 4488 of file pyscanner.cpp.

4489 {
4490  int num_to_alloc;
4491 
4492  if (!(yy_buffer_stack)) {
4493 
4494  /* First allocation is just for 2 elements, since we don't know if this
4495  * scanner will even need a stack. We use 2 instead of 1 to avoid an
4496  * immediate realloc on the next call.
4497  */
4498  num_to_alloc = 1;
4500  (num_to_alloc * sizeof(struct yy_buffer_state*)
4501  );
4502  if ( ! (yy_buffer_stack) )
4503  YY_FATAL_ERROR( "out of dynamic memory in pyscannerYYensure_buffer_stack()" );
4504 
4505  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
4506 
4507  (yy_buffer_stack_max) = num_to_alloc;
4508  (yy_buffer_stack_top) = 0;
4509  return;
4510  }
4511 
4512  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
4513 
4514  /* Increase the buffer to prepare for a possible push. */
4515  int grow_size = 8 /* arbitrary grow size */;
4516 
4517  num_to_alloc = (yy_buffer_stack_max) + grow_size;
4519  ((yy_buffer_stack),
4520  num_to_alloc * sizeof(struct yy_buffer_state*)
4521  );
4522  if ( ! (yy_buffer_stack) )
4523  YY_FATAL_ERROR( "out of dynamic memory in pyscannerYYensure_buffer_stack()" );
4524 
4525  /* zero only the new slots.*/
4526  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
4527  (yy_buffer_stack_max) = num_to_alloc;
4528  }
4529 }
void * pyscannerYYrealloc(void *, yy_size_t)
Definition: pyscanner.cpp:4811
#define YY_FATAL_ERROR(msg)
Definition: pyscanner.cpp:2011
static YY_BUFFER_STATE * yy_buffer_stack
Definition: pyscanner.cpp:274
static size_t yy_buffer_stack_top
Definition: pyscanner.cpp:272
void * pyscannerYYalloc(yy_size_t)
Definition: pyscanner.cpp:4806
static size_t yy_buffer_stack_max
Definition: pyscanner.cpp:273
void pyscannerYYfree ( void *  ptr)

Definition at line 4823 of file pyscanner.cpp.

4824 {
4825  free( (char *) ptr ); /* see pyscannerYYrealloc() for (char *) cast */
4826 }
int pyscannerYYget_debug ( void  )

Definition at line 4714 of file pyscanner.cpp.

4715 {
4716  return pyscannerYY_flex_debug;
4717 }
int pyscannerYY_flex_debug
Definition: pyscanner.cpp:1346
YY_EXTRA_TYPE pyscannerYYget_extra ( void  )
FILE * pyscannerYYget_in ( void  )

Get the input stream.

Definition at line 4658 of file pyscanner.cpp.

4659 {
4660  return pyscannerYYin;
4661 }
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
int pyscannerYYget_leng ( void  )

Get the length of the current token.

Definition at line 4674 of file pyscanner.cpp.

4675 {
4676  return pyscannerYYleng;
4677 }
int pyscannerYYleng
Definition: pyscanner.cpp:294
int pyscannerYYget_lineno ( void  )

Get the current line number.

Definition at line 4649 of file pyscanner.cpp.

4650 {
4651 
4652  return pyscannerYYlineno;
4653 }
int pyscannerYYlineno
Definition: pyscanner.cpp:365
FILE * pyscannerYYget_out ( void  )

Get the output stream.

Definition at line 4666 of file pyscanner.cpp.

4667 {
4668  return pyscannerYYout;
4669 }
FILE * pyscannerYYout
Definition: pyscanner.cpp:359
char * pyscannerYYget_text ( void  )

Get the current token.

Definition at line 4683 of file pyscanner.cpp.

4684 {
4685  return pyscannerYYtext;
4686 }
char * pyscannerYYtext
Definition: pyscanner.cpp:1370
int pyscannerYYlex ( void  )
int pyscannerYYlex_destroy ( void  )

Definition at line 4758 of file pyscanner.cpp.

4759 {
4760 
4761  /* Pop the buffer stack, destroying each element. */
4762  while(YY_CURRENT_BUFFER){
4764  YY_CURRENT_BUFFER_LVALUE = NULL;
4766  }
4767 
4768  /* Destroy the stack itself. */
4770  (yy_buffer_stack) = NULL;
4771 
4773  (yy_state_buf) = NULL;
4774 
4775  /* Reset the globals. This is important in a non-reentrant scanner so the next time
4776  * pyscannerYYlex() is called, initialization will occur. */
4777  yy_init_globals( );
4778 
4779  return 0;
4780 }
void pyscannerYYpop_buffer_state(void)
Definition: pyscanner.cpp:4469
static YY_BUFFER_STATE * yy_buffer_stack
Definition: pyscanner.cpp:274
static int yy_init_globals(void)
Definition: pyscanner.cpp:4724
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
static yy_state_type * yy_state_buf
Definition: pyscanner.cpp:1348
void pyscannerYY_delete_buffer(YY_BUFFER_STATE b)
Definition: pyscanner.cpp:4363
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
void pyscannerYYfree(void *)
Definition: pyscanner.cpp:4823
void pyscannerYYpop_buffer_state ( void  )

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

Definition at line 4469 of file pyscanner.cpp.

4470 {
4471  if (!YY_CURRENT_BUFFER)
4472  return;
4473 
4475  YY_CURRENT_BUFFER_LVALUE = NULL;
4476  if ((yy_buffer_stack_top) > 0)
4477  --(yy_buffer_stack_top);
4478 
4479  if (YY_CURRENT_BUFFER) {
4482  }
4483 }
static size_t yy_buffer_stack_top
Definition: pyscanner.cpp:272
static void pyscannerYY_load_buffer_state(void)
Definition: pyscanner.cpp:4321
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
void pyscannerYY_delete_buffer(YY_BUFFER_STATE b)
Definition: pyscanner.cpp:4363
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
static int yy_did_buffer_switch_on_eof
Definition: pyscanner.cpp:304
void pyscannerYYpush_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 4439 of file pyscanner.cpp.

4440 {
4441  if (new_buffer == NULL)
4442  return;
4443 
4445 
4446  /* This block is copied from pyscannerYY_switch_to_buffer. */
4447  if ( YY_CURRENT_BUFFER )
4448  {
4449  /* Flush out information for old buffer. */
4450  *(yy_c_buf_p) = (yy_hold_char);
4451  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
4452  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4453  }
4454 
4455  /* Only push if top exists. Otherwise, replace top. */
4456  if (YY_CURRENT_BUFFER)
4457  (yy_buffer_stack_top)++;
4458  YY_CURRENT_BUFFER_LVALUE = new_buffer;
4459 
4460  /* copied from pyscannerYY_switch_to_buffer. */
4463 }
static size_t yy_buffer_stack_top
Definition: pyscanner.cpp:272
static char yy_hold_char
Definition: pyscanner.cpp:292
static void pyscannerYY_load_buffer_state(void)
Definition: pyscanner.cpp:4321
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
static void pyscannerYYensure_buffer_stack(void)
Definition: pyscanner.cpp:4488
static char * yy_c_buf_p
Definition: pyscanner.cpp:297
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
static int yy_did_buffer_switch_on_eof
Definition: pyscanner.cpp:304
static int yy_n_chars
Definition: pyscanner.cpp:293
void * pyscannerYYrealloc ( void *  ptr,
yy_size_t  size 
)

Definition at line 4811 of file pyscanner.cpp.

4812 {
4813  /* The cast to (char *) in the following accommodates both
4814  * implementations that use char* generic pointers, and those
4815  * that use void* generic pointers. It works with the latter
4816  * because both ANSI C and C++ allow castless assignment from
4817  * any pointer type to void*, and deal with argument conversions
4818  * as though doing an assignment.
4819  */
4820  return (void *) realloc( (char *) ptr, size );
4821 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void pyscannerYYrestart ( 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 4273 of file pyscanner.cpp.

4274 {
4275 
4276  if ( ! YY_CURRENT_BUFFER ){
4280  }
4281 
4284 }
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
#define YY_BUF_SIZE
Definition: pyscanner.cpp:163
YY_BUFFER_STATE pyscannerYY_create_buffer(FILE *file, int size)
Definition: pyscanner.cpp:4335
static void pyscannerYY_load_buffer_state(void)
Definition: pyscanner.cpp:4321
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
static void pyscannerYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: pyscanner.cpp:4382
static void pyscannerYYensure_buffer_stack(void)
Definition: pyscanner.cpp:4488
#define YY_CURRENT_BUFFER
Definition: pyscanner.cpp:282
void pyscannerYYset_debug ( int  debug_flag)

Definition at line 4719 of file pyscanner.cpp.

4720 {
4721  pyscannerYY_flex_debug = bdebug ;
4722 }
int pyscannerYY_flex_debug
Definition: pyscanner.cpp:1346
void pyscannerYYset_extra ( YY_EXTRA_TYPE  user_defined)
void pyscannerYYset_in ( FILE *  in_str)

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

Parameters
in_strA readable stream.
See also
pyscannerYY_switch_to_buffer

Definition at line 4704 of file pyscanner.cpp.

4705 {
4706  pyscannerYYin = in_str ;
4707 }
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
void pyscannerYYset_lineno ( int  line_number)

Set the current line number.

Parameters
line_number

Definition at line 4692 of file pyscanner.cpp.

4693 {
4694 
4695  pyscannerYYlineno = line_number;
4696 }
int pyscannerYYlineno
Definition: pyscanner.cpp:365
void pyscannerYYset_out ( FILE *  out_str)

Definition at line 4709 of file pyscanner.cpp.

4710 {
4711  pyscannerYYout = out_str ;
4712 }
FILE * pyscannerYYout
Definition: pyscanner.cpp:359
static void searchFoundClass ( )
static

Definition at line 1786 of file pyscanner.cpp.

1787 {
1789  current->argList->clear();
1790  current->type += "class" ;
1795 }
static bool g_packageCommentAllowed
Definition: pyscanner.cpp:1483
const bool FALSE
Definition: qglobal.h:370
ArgumentList * argList
member arguments as a list
Definition: entry.h:254
static QCString yyFileName
Definition: pyscanner.cpp:1447
int startLine
start line of entry in the source
Definition: entry.h:283
void clear()
Definition: qlist.h:82
static int yyLineNr
Definition: pyscanner.cpp:1446
static Entry * current
Definition: pyscanner.cpp:1443
QCString fileName
file this entry was extracted from
Definition: entry.h:282
QCString type
member type
Definition: entry.h:236
int section
entry type (see Sections);
Definition: entry.h:235
int bodyLine
line number of the definition in the source
Definition: entry.h:276
static void searchFoundDef ( )
static

Definition at line 1767 of file pyscanner.cpp.

1768 {
1774  current->virt = Normal;
1775  current->stat = gstat;
1776  current->mtype = mtype = Method;
1777  current->type.resize(0);
1778  current->name.resize(0);
1779  current->args.resize(0);
1780  current->argList->clear();
1782  gstat=FALSE;
1783  //printf("searchFoundDef at=%d\n",yyLineNr);
1784 }
bool resize(uint newlen)
Definition: qcstring.h:225
bool stat
static ?
Definition: entry.h:245
static MethodTypes mtype
Definition: pyscanner.cpp:1448
static bool g_packageCommentAllowed
Definition: pyscanner.cpp:1483
const bool FALSE
Definition: qglobal.h:370
ArgumentList * argList
member arguments as a list
Definition: entry.h:254
QCString name
member name
Definition: entry.h:237
Definition: types.h:29
Definition: types.h:32
static QCString yyFileName
Definition: pyscanner.cpp:1447
int startLine
start line of entry in the source
Definition: entry.h:283
QCString args
member argument string
Definition: entry.h:252
void clear()
Definition: qlist.h:82
static int yyLineNr
Definition: pyscanner.cpp:1446
Specifier virt
virtualness of the entry
Definition: entry.h:251
static Entry * current
Definition: pyscanner.cpp:1443
QCString fileName
file this entry was extracted from
Definition: entry.h:282
MethodTypes mtype
signal, slot, (dcop) method, or property?
Definition: entry.h:242
static bool gstat
Definition: pyscanner.cpp:1449
SrcLangExt lang
programming language in which this entry was found
Definition: entry.h:286
QCString type
member type
Definition: entry.h:236
int section
entry type (see Sections);
Definition: entry.h:235
int bodyLine
line number of the definition in the source
Definition: entry.h:276
static void startCommentBlock ( bool  brief)
static

Definition at line 1653 of file pyscanner.cpp.

1654 {
1655  if (brief)
1656  {
1659  }
1660  else
1661  {
1664  }
1665 }
bool brief
int briefLine
line number at which the brief desc. was found
Definition: entry.h:264
int docLine
line number at which the documentation was found
Definition: entry.h:261
static QCString yyFileName
Definition: pyscanner.cpp:1447
static int yyLineNr
Definition: pyscanner.cpp:1446
static Entry * current
Definition: pyscanner.cpp:1443
QCString docFile
file in which the documentation was found
Definition: entry.h:262
QCString briefFile
file in which the brief desc. was found
Definition: entry.h:265
while ( )

Definition at line 2092 of file pyscanner.cpp.

2093  {
2094  yy_cp = (yy_c_buf_p);
2095 
2096  /* Support of pyscannerYYtext. */
2097  *yy_cp = (yy_hold_char);
2098 
2099  /* yy_bp points to the position in yy_ch_buf of the start of
2100  * the current run.
2101  */
2102  yy_bp = yy_cp;
2103 
2104  yy_current_state = (yy_start);
2105  yy_current_state += YY_AT_BOL();
2106 
2107  (yy_state_ptr) = (yy_state_buf);
2108  *(yy_state_ptr)++ = yy_current_state;
2109 
2110 yy_match:
2111  do
2112  {
2113  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
2114  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2115  {
2116  yy_current_state = (int) yy_def[yy_current_state];
2117  if ( yy_current_state >= 496 )
2118  yy_c = yy_meta[(unsigned int) yy_c];
2119  }
2120  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2121  *(yy_state_ptr)++ = yy_current_state;
2122  ++yy_cp;
2123  }
2124  while ( yy_current_state != 495 );
2125 
2126 yy_find_action:
2127  yy_current_state = *--(yy_state_ptr);
2128  (yy_lp) = yy_accept[yy_current_state];
2129 find_rule: /* we branch to this label when backing up */
2130  for ( ; ; ) /* until we find what rule we matched */
2131  {
2132  if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
2133  {
2134  yy_act = yy_acclist[(yy_lp)];
2135  if ( yy_act & YY_TRAILING_HEAD_MASK ||
2137  {
2139  {
2142  break;
2143  }
2144  }
2145  else if ( yy_act & YY_TRAILING_MASK )
2146  {
2147  (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
2149  (yy_full_match) = yy_cp;
2151  (yy_full_lp) = (yy_lp);
2152  }
2153  else
2154  {
2155  (yy_full_match) = yy_cp;
2157  (yy_full_lp) = (yy_lp);
2158  break;
2159  }
2160  ++(yy_lp);
2161  goto find_rule;
2162  }
2163  --yy_cp;
2164  yy_current_state = *--(yy_state_ptr);
2165  (yy_lp) = yy_accept[yy_current_state];
2166  }
2167 
2169 
2170 do_action: /* This label is used only to access EOF actions. */
2171 
2172  switch ( yy_act )
2173  { /* beginning of action switch */
2174 
2175 case 1:
2177 #line 544 "pyscanner.l"
2178 { // start of a function/method definition with indent
2179  DBG_CTX((stderr,"Found def at %d\n",yyLineNr));
2181  searchFoundDef();
2182  BEGIN( FunctionDec );
2183  }
2184  YY_BREAK
2185 case 2:
2187 #line 550 "pyscanner.l"
2188 { // start of a function/method definition
2189  searchFoundDef();
2190  BEGIN( FunctionDec );
2191  }
2192  YY_BREAK
2193 case 3:
2195 #line 555 "pyscanner.l"
2196 { // start of a class definition with indent
2197  DBG_CTX((stderr,"Found class at %d\n",yyLineNr));
2199  searchFoundClass();
2200  BEGIN( ClassDec ) ;
2201  }
2202  YY_BREAK
2203 case 4:
2205 #line 561 "pyscanner.l"
2206 { // start of a class definition
2207  searchFoundClass();
2208  BEGIN( ClassDec ) ;
2209  }
2210  YY_BREAK
2211 case 5:
2212 #line 566 "pyscanner.l"
2213 case 6:
2215 #line 566 "pyscanner.l"
2216 { // start of an from import
2218  BEGIN( FromMod );
2219  }
2220  YY_BREAK
2221 case 7:
2222 #line 572 "pyscanner.l"
2223 case 8:
2225 #line 572 "pyscanner.l"
2226 { // start of an import statement
2228  BEGIN( Import );
2229  }
2230  YY_BREAK
2231 case 9:
2233 #line 576 "pyscanner.l"
2234 { // property
2236  current->mtype = Property;
2242  BEGIN(VariableDec);
2243  }
2244  YY_BREAK
2245 case 10:
2246 /* rule 10 can match eol */
2248 #line 586 "pyscanner.l"
2249 { // variable
2250  if (g_search_count) REJECT;
2258  BEGIN(VariableDec);
2259  }
2260  YY_BREAK
2261 case 11:
2262 /* rule 11 can match eol */
2264 #line 597 "pyscanner.l"
2265 { // list of variables, we cannot place the default value
2266  // so we will skip it later on in a general rule
2267  // Also note ")" this is to catch also (a,b). the "("
2268  // is caught in the rule: [(], the ")" will be handled in [)]
2269  if (g_search_count > 1) REJECT;
2277  newVariable();
2278  }
2279  YY_BREAK
2280 case 12:
2282 #line 611 "pyscanner.l"
2283 { // start of a single quoted string
2285  g_copyString=0;
2288  }
2289  YY_BREAK
2290 case 13:
2292 #line 617 "pyscanner.l"
2293 { // start of a double quoted string
2295  g_copyString=0;
2298  }
2299  YY_BREAK
2300 case 14:
2302 #line 623 "pyscanner.l"
2303 {
2304  gstat=TRUE;
2305  }
2306  YY_BREAK
2307 case 15:
2309 #line 626 "pyscanner.l"
2310 { // Unix type script comment
2311  if (yyLineNr != 1) REJECT;
2312  }
2313  YY_BREAK
2314 case 16:
2316 #line 629 "pyscanner.l"
2317 { // normal comment
2319  }
2320  YY_BREAK
2321 case 17:
2323 #line 632 "pyscanner.l"
2324 { // some other identifier
2326  }
2327  YY_BREAK
2328 case 18:
2330 #line 635 "pyscanner.l"
2331 {
2333  }
2334  YY_BREAK
2335 case 19:
2336 /* rule 19 can match eol */
2338 #line 639 "pyscanner.l"
2339 { // new line
2340  lineCount();
2341  }
2342  YY_BREAK
2343 case 20:
2345 #line 643 "pyscanner.l"
2346 { // start of a comment block
2349  }
2350  YY_BREAK
2351 case 21:
2353 #line 648 "pyscanner.l"
2354 { // start of a comment block
2357  }
2358  YY_BREAK
2359 case 22:
2360 /* rule 22 can match eol */
2361 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */
2362 (yy_c_buf_p) = yy_cp = yy_bp + 2;
2363 YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */
2365 #line 653 "pyscanner.l"
2366 { // start of a special comment
2369  initSpecialBlock();
2371  }
2372  YY_BREAK
2373 case 23:
2375 #line 659 "pyscanner.l"
2376 { // we have to do something with (
2377  g_search_count += 1;
2378  }
2379  YY_BREAK
2380 case 24:
2382 #line 662 "pyscanner.l"
2383 { // we have to do something with )
2384  g_search_count -= 1;
2385  }
2386  YY_BREAK
2387 case 25:
2389 #line 665 "pyscanner.l"
2390 { // any other character...
2391  // This is the major default
2392  // that should catch everything
2393  // else in Body.
2394  }
2395  YY_BREAK
2396 
2397 
2398 case 26:
2400 #line 673 "pyscanner.l"
2401 { // python3 style imports
2402  }
2403  YY_BREAK
2404 case 27:
2406 #line 675 "pyscanner.l"
2407 { // from package import
2409  }
2410  YY_BREAK
2411 case 28:
2413 #line 678 "pyscanner.l"
2414 {
2415  BEGIN(FromModItem);
2416  }
2417  YY_BREAK
2418 case 29:
2419 /* rule 29 can match eol */
2421 #line 681 "pyscanner.l"
2422 {
2423  incLineNr();
2424  BEGIN(Search);
2425  }
2426  YY_BREAK
2427 case 30:
2429 #line 685 "pyscanner.l"
2430 {
2431  }
2432  YY_BREAK
2433 case 31:
2435 #line 687 "pyscanner.l"
2436 {
2438  BEGIN(Search);
2439  }
2440  YY_BREAK
2441 
2442 
2443 case 32:
2445 #line 694 "pyscanner.l"
2446 { // import all
2447  QCString item=g_packageName;
2450  //printf("Adding using directive: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2453  current = new Entry ;
2454  initEntry();
2455  BEGIN(Search);
2456  }
2457  YY_BREAK
2458 case 33:
2460 #line 705 "pyscanner.l"
2461 {
2465  //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2468  current = new Entry ;
2469  initEntry();
2470  }
2471  YY_BREAK
2472 case 34:
2474 #line 715 "pyscanner.l"
2475 {
2479  //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2482  current = new Entry ;
2483  initEntry();
2484  BEGIN(Search);
2485  }
2486  YY_BREAK
2487 case 35:
2488 /* rule 35 can match eol */
2490 #line 726 "pyscanner.l"
2491 {
2492  incLineNr();
2493  BEGIN(Search);
2494  }
2495  YY_BREAK
2496 case 36:
2498 #line 730 "pyscanner.l"
2499 {
2500  }
2501  YY_BREAK
2502 case 37:
2504 #line 732 "pyscanner.l"
2505 {
2506  }
2507  YY_BREAK
2508 case 38:
2510 #line 734 "pyscanner.l"
2511 {
2512  unput(*pyscannerYYtext);
2513  BEGIN(Search);
2514  }
2515  YY_BREAK
2516 
2517 
2518 case 39:
2520 #line 741 "pyscanner.l"
2521 {
2522  current->name=removeRedundantWhiteSpace(substitute(pyscannerYYtext,".","::"));
2524  //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2527  current = new Entry ;
2528  initEntry();
2529  BEGIN(Search);
2530  }
2531  YY_BREAK
2532 case 40:
2533 /* rule 40 can match eol */
2535 #line 751 "pyscanner.l"
2536 {
2537  incLineNr();
2538  BEGIN(Search);
2539  }
2540  YY_BREAK
2541 case 41:
2543 #line 755 "pyscanner.l"
2544 {
2545  }
2546  YY_BREAK
2547 case 42:
2549 #line 757 "pyscanner.l"
2550 {
2551  unput(*pyscannerYYtext);
2552  BEGIN(Search);
2553  }
2554  YY_BREAK
2555 
2556 
2557 case 43:
2559 #line 764 "pyscanner.l"
2560 {
2561  DBG_CTX((stderr,"Found instance method variable %s in %s at %d\n",&pyscannerYYtext[5],current_root->name.data(),yyLineNr));
2562  current->name=&pyscannerYYtext[5];
2567  current->type.resize(0);
2568  if (current->name.at(0)=='_') // mark as private
2569  {
2571  }
2572  newEntry();
2573  }
2574  YY_BREAK
2575 case 44:
2577 #line 778 "pyscanner.l"
2578 {
2579  DBG_CTX((stderr,"Found class method variable %s in %s at %d\n",&pyscannerYYtext[4],current_root->name.data(),yyLineNr));
2580  current->name=&pyscannerYYtext[4];
2585  current->type.resize(0);
2586  if (current->name.at(0)=='_') // mark as private
2587  {
2589  }
2590  newEntry();
2591  }
2592  YY_BREAK
2593 case 45:
2595 #line 792 "pyscanner.l"
2596 { // start of a comment block
2599  }
2600  YY_BREAK
2601 case 46:
2603 #line 797 "pyscanner.l"
2604 { // start of a comment block
2607  }
2608  YY_BREAK
2609 case 47:
2610 /* rule 47 can match eol */
2611 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */
2612 (yy_c_buf_p) = yy_cp = yy_bp + 2;
2613 YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */
2615 #line 802 "pyscanner.l"
2616 { // start of a special comment
2617  initSpecialBlock();
2619  }
2620  YY_BREAK
2621 case 48:
2623 #line 806 "pyscanner.l"
2624 { // #
2625  }
2626  YY_BREAK
2627 case 49:
2629 #line 808 "pyscanner.l"
2630 { // start of a single quoted string
2632  g_copyString=0;
2634  }
2635  YY_BREAK
2636 case 50:
2638 #line 813 "pyscanner.l"
2639 { // start of a double quoted string
2641  g_copyString=0;
2643  }
2644  YY_BREAK
2645 case 51:
2646 /* rule 51 can match eol */
2648 #line 818 "pyscanner.l"
2649 { incLineNr(); }
2650  YY_BREAK
2651 case 52:
2653 #line 819 "pyscanner.l"
2654 // identifiers
2655  YY_BREAK
2656 case 53:
2658 #line 820 "pyscanner.l"
2659 // other uninteresting stuff
2660  YY_BREAK
2661 case 54:
2663 #line 821 "pyscanner.l"
2664 // anything else
2665  YY_BREAK
2666 
2667 
2668 case 55:
2669 /* rule 55 can match eol */
2671 #line 825 "pyscanner.l"
2672 {
2673  DBG_CTX((stderr,"indent %d<=%d\n",computeIndent(&pyscannerYYtext[1]),g_indent));
2674  if (computeIndent(&pyscannerYYtext[1])<=g_indent)
2675  {
2676  int i;
2677  for (i=(int)pyscannerYYleng-1;i>=0;i--)
2678  {
2679  unput(pyscannerYYtext[i]);
2680  }
2681  endOfDef();
2682  //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2683  BEGIN(Search);
2684  }
2685  else
2686  {
2687  incLineNr();
2689  }
2690  }
2691  YY_BREAK
2692 case 56:
2693 /* rule 56 can match eol */
2694 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */
2695 (yy_c_buf_p) = yy_cp -= 2;
2696 YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */
2698 #line 844 "pyscanner.l"
2699 {
2700  if (computeIndent(&pyscannerYYtext[1])<=g_indent)
2701  {
2702  int i;
2703  for (i=(int)pyscannerYYleng-1;i>=0;i--)
2704  {
2705  unput(pyscannerYYtext[i]);
2706  }
2707  endOfDef();
2708  //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2709  BEGIN(Search);
2710  }
2711  else
2712  {
2713  incLineNr();
2715  }
2716  }
2717  YY_BREAK
2719 #line 862 "pyscanner.l"
2720 {
2721  endOfDef();
2722  yyterminate();
2723  }
2724  YY_BREAK
2725 case 57:
2726 /* rule 57 can match eol */
2727 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */
2728 (yy_c_buf_p) = yy_cp -= 1;
2729 YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */
2731 #line 866 "pyscanner.l"
2732 { // skip empty line
2734  }
2735  YY_BREAK
2736 case 58:
2738 #line 869 "pyscanner.l"
2739 { // something at indent >0
2741  g_curIndent = computeIndent(pyscannerYYtext);
2742  if (g_curIndent<=g_indent)
2743  // jumped out of the function
2744  {
2745  endOfDef(1);
2746  BEGIN(Search);
2747  }
2748  }
2749  YY_BREAK
2750 case 59:
2752 #line 879 "pyscanner.l"
2753 { // start of a single quoted string
2756  g_specialBlock = FALSE;
2759  }
2760  YY_BREAK
2761 case 60:
2763 #line 886 "pyscanner.l"
2764 { // start of a double quoted string
2767  g_specialBlock = FALSE;
2770  }
2771  YY_BREAK
2772 case 61:
2774 #line 893 "pyscanner.l"
2775 { // non-special stuff
2777  g_specialBlock = FALSE;
2778  }
2779  YY_BREAK
2780 case 62:
2782 #line 897 "pyscanner.l"
2783 { // normal comment
2785  }
2786  YY_BREAK
2787 case 63:
2789 #line 900 "pyscanner.l"
2790 { // comment half way
2792  }
2793  YY_BREAK
2794 case 64:
2795 /* rule 64 can match eol */
2797 #line 903 "pyscanner.l"
2798 {
2799  incLineNr();
2801  }
2802  YY_BREAK
2803 case 65:
2805 #line 907 "pyscanner.l"
2806 { // any character
2808  g_specialBlock = FALSE;
2809  }
2810  YY_BREAK
2811 case 66:
2813 #line 912 "pyscanner.l"
2814 { // start of a comment block
2818  }
2819  YY_BREAK
2820 case 67:
2822 #line 918 "pyscanner.l"
2823 { // start of a comment block
2827  }
2828  YY_BREAK
2829 case 68:
2830 /* rule 68 can match eol */
2831 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */
2832 (yy_c_buf_p) = yy_cp = yy_bp + 2;
2833 YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */
2835 #line 924 "pyscanner.l"
2836 { // start of a special comment
2837  initSpecialBlock();
2839  }
2840  YY_BREAK
2841 
2842 
2843 case 69:
2845 #line 933 "pyscanner.l"
2846 {
2847  //found function name
2848  if (current->type.isEmpty())
2849  {
2850  current->type = "def";
2851  }
2854  newFunction();
2855  }
2856  YY_BREAK
2857 case 70:
2859 #line 943 "pyscanner.l"
2860 { // function without arguments
2861  g_specialBlock = TRUE; // expecting a docstring
2862  bodyEntry = current;
2864  BEGIN( FunctionBody );
2865  }
2866  YY_BREAK
2867 case 71:
2869 #line 950 "pyscanner.l"
2870 {
2871  BEGIN( FunctionParams );
2872  }
2873  YY_BREAK
2874 
2875 
2876 case 72:
2878 #line 956 "pyscanner.l"
2879 {
2880  }
2881  YY_BREAK
2882 case 73:
2884 #line 959 "pyscanner.l"
2885 { // Name of parameter
2886  lineCount();
2887  Argument *a = new Argument;
2888  current->argList->append(a);
2889  current->argList->getLast()->name = QCString(pyscannerYYtext).stripWhiteSpace();
2890  current->argList->getLast()->type = "";
2891  }
2892  YY_BREAK
2893 case 74:
2895 #line 966 "pyscanner.l"
2896 { // default value
2897  // TODO: this rule is too simple, need to be able to
2898  // match things like =")" as well!
2899  g_defVal.resize(0);
2900  g_braceCount=0;
2902  }
2903  YY_BREAK
2904 case 75:
2906 #line 974 "pyscanner.l"
2907 { // end of parameter list
2909  }
2910  YY_BREAK
2911 case 76:
2913 #line 978 "pyscanner.l"
2914 {
2915  g_specialBlock = TRUE; // expecting a docstring
2916  bodyEntry = current;
2918  BEGIN( FunctionBody );
2919  }
2920  YY_BREAK
2921 case 77:
2923 #line 984 "pyscanner.l"
2924 { // a comment
2925  }
2926  YY_BREAK
2927 case 78:
2929 #line 986 "pyscanner.l"
2930 { // Default rule inside arguments.
2931  }
2932  YY_BREAK
2933 
2934 
2935 case 79:
2937 #line 992 "pyscanner.l"
2938 { // internal opening brace
2939  g_braceCount++;
2941  }
2942  YY_BREAK
2943 case 80:
2944 #line 997 "pyscanner.l"
2945 case 81:
2947 #line 997 "pyscanner.l"
2948 {
2949  if (g_braceCount==0) // end of default argument
2950  {
2951  if (current->argList->getLast())
2952  {
2954  }
2955  if (*pyscannerYYtext == ')')
2958  }
2959  else // continue
2960  {
2961  if (*pyscannerYYtext == ')')g_braceCount--;
2963  }
2964  }
2965  YY_BREAK
2966 case 82:
2968 #line 1014 "pyscanner.l"
2969 {
2971  }
2972  YY_BREAK
2973 case 83:
2974 /* rule 83 can match eol */
2976 #line 1017 "pyscanner.l"
2977 {
2979  incLineNr();
2980  }
2981  YY_BREAK
2982 
2983 
2984 case 84:
2985 /* rule 84 can match eol */
2986 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */
2987 (yy_c_buf_p) = yy_cp = yy_bp + 1;
2988 YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */
2990 #line 1025 "pyscanner.l"
2991 { // new def at indent 0
2992  incLineNr();
2993  endOfDef();
2994  //g_hideClassDocs = FALSE;
2995  //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2996  BEGIN(Search);
2997  }
2998  YY_BREAK
2999 case 85:
3000 /* rule 85 can match eol */
3001 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */
3002 (yy_c_buf_p) = yy_cp = yy_bp + 1;
3003 YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */
3005 #line 1032 "pyscanner.l"
3006 { // start of a special comment at indent 0
3007  incLineNr();
3008  endOfDef();
3009  //g_hideClassDocs = FALSE;
3010  //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
3011  BEGIN(Search);
3012  }
3013  YY_BREAK
3014 case 86:
3015 /* rule 86 can match eol */
3016 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */
3017 (yy_c_buf_p) = yy_cp -= 1;
3018 YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */
3020 #line 1039 "pyscanner.l"
3021 { // skip empty line
3023  }
3024  YY_BREAK
3025 case YY_STATE_EOF(ClassBody):
3026 #line 1042 "pyscanner.l"
3027 {
3028  endOfDef();
3029  yyterminate();
3030  }
3031  YY_BREAK
3032 case 87:
3034 #line 1046 "pyscanner.l"
3035 { // something at indent >0
3036  g_curIndent=computeIndent(pyscannerYYtext);
3037  DBG_CTX((stderr,"g_curIndent=%d g_indent=%d\n",g_curIndent,g_indent));
3038  if (g_curIndent<=g_indent)
3039  // jumped out of the class/method
3040  {
3041  endOfDef(1);
3043  // make sure the next rule matches ^...
3044  //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
3045  //g_hideClassDocs = FALSE;
3046  BEGIN(Search);
3047  }
3048  else
3049  {
3051  }
3052  }
3053  YY_BREAK
3054 case 88:
3056 #line 1064 "pyscanner.l"
3057 { // start of a single quoted string
3060  g_specialBlock = FALSE;
3063  }
3064  YY_BREAK
3065 case 89:
3067 #line 1071 "pyscanner.l"
3068 { // start of a double quoted string
3071  g_specialBlock = FALSE;
3074  }
3075  YY_BREAK
3076 case 90:
3078 #line 1078 "pyscanner.l"
3079 { // non-special stuff
3081  g_specialBlock = FALSE;
3082  //g_hideClassDocs = FALSE;
3083  }
3084  YY_BREAK
3085 case 91:
3086 /* rule 91 can match eol */
3088 #line 1083 "pyscanner.l"
3089 {
3091  incLineNr();
3092  }
3093  YY_BREAK
3094 case 92:
3096 #line 1087 "pyscanner.l"
3097 { // normal comment
3099  }
3100  YY_BREAK
3101 case 93:
3103 #line 1090 "pyscanner.l"
3104 { // any character
3105  g_specialBlock = FALSE;
3107  }
3108  YY_BREAK
3109 case 94:
3111 #line 1094 "pyscanner.l"
3112 { // start of a comment block
3113  //if (!g_hideClassDocs)
3117  }
3118  YY_BREAK
3119 case 95:
3121 #line 1101 "pyscanner.l"
3122 { // start of a comment block
3123  //if (!g_hideClassDocs)
3127  }
3128  YY_BREAK
3129 
3130 case 96:
3132 #line 1109 "pyscanner.l"
3133 {
3134  if (current->type.isEmpty())
3135  {
3136  current->type = "class";
3137  }
3138 
3141 
3142  // prepend scope in case of nested classes
3144  {
3145  //printf("*** Prepending scope %s to class %s\n",current_root->name.data(),current->name.data());
3147  }
3148 
3154  docBlock.resize(0);
3155 
3157  }
3158  YY_BREAK
3159 
3160 case 97:
3162 #line 1136 "pyscanner.l"
3163 { // syntactic sugar for the list
3164  }
3165  YY_BREAK
3166 case 98:
3168 #line 1139 "pyscanner.l"
3169 { // begin of the class definition
3170  g_specialBlock = TRUE; // expecting a docstring
3172  current->program.resize(0);
3174  }
3175  YY_BREAK
3176 case 99:
3178 #line 1146 "pyscanner.l"
3179 {
3181  new BaseInfo(substitute(pyscannerYYtext,".","::"),Public,Normal)
3182  );
3183  //Has base class-do stuff
3184  }
3185  YY_BREAK
3186 
3187 
3188 case 100:
3189 /* rule 100 can match eol */
3191 #line 1156 "pyscanner.l"
3192 {
3193  // Blankline - ignore, keep looking for indentation.
3194  lineCount();
3196  }
3197  YY_BREAK
3198 case 101:
3200 #line 1162 "pyscanner.l"
3201 { // start of a comment block
3205  }
3206  YY_BREAK
3207 case 102:
3209 #line 1168 "pyscanner.l"
3210 { // start of a comment block
3214  }
3215  YY_BREAK
3216 case 103:
3218 #line 1174 "pyscanner.l"
3219 {
3221  //current->startLine = yyLineNr;
3222  g_curIndent=computeIndent(pyscannerYYtext);
3223  bodyEntry = current;
3224  DBG_CTX((stderr,"setting indent %d\n",g_curIndent));
3225  //printf("current->program=[%s]\n",current->program.data());
3226  //g_hideClassDocs = TRUE;
3227  BEGIN(ClassBody);
3228  }
3229  YY_BREAK
3230 case 104:
3232 #line 1185 "pyscanner.l"
3233 {
3234 
3235  // Just pushback an empty class, and
3236  // resume parsing the body.
3237  newEntry();
3239 
3240  // printf("Failed to find indent - skipping!");
3241  BEGIN( Search );
3242  }
3243  YY_BREAK
3244 
3245 
3246 case 105:
3248 #line 1199 "pyscanner.l"
3249 { // the assignment operator
3250  //printf("====== VariableDec at line %d\n",yyLineNr);
3251  g_start_init = TRUE;
3253  current->initializer += " ";
3254  }
3255  YY_BREAK
3256 case 106:
3258 #line 1205 "pyscanner.l"
3259 { // spaces
3260  }
3261  YY_BREAK
3262 case 107:
3264 #line 1207 "pyscanner.l"
3265 { // integer value
3266  current->type = "int";
3268  BEGIN(VariableEnd);
3269  }
3270  YY_BREAK
3271 case 108:
3273 #line 1212 "pyscanner.l"
3274 { // floating point value
3275  current->type = "float";
3277  BEGIN(VariableEnd);
3278  }
3279  YY_BREAK
3280 case 109:
3282 #line 1217 "pyscanner.l"
3283 { // boolean value
3284  current->type = "bool";
3286  BEGIN(VariableEnd);
3287  }
3288  YY_BREAK
3289 case 110:
3291 #line 1222 "pyscanner.l"
3292 { // string
3293  current->type = "string";
3298  }
3299  YY_BREAK
3300 case 111:
3302 #line 1229 "pyscanner.l"
3303 { // string
3304  current->type = "string";
3309  }
3310  YY_BREAK
3311 case 112:
3313 #line 1236 "pyscanner.l"
3314 { // start of a comment block
3315  current->type = "string";
3321  }
3322  YY_BREAK
3323 case 113:
3325 #line 1245 "pyscanner.l"
3326 { // start of a comment block
3327  current->type = "string";
3333  }
3334  YY_BREAK
3335 case 114:
3337 #line 1253 "pyscanner.l"
3338 { // tuple, only when direct after =
3340  {
3341  current->type = "tuple";
3342  }
3344  g_atomStart='(';
3345  g_atomEnd=')';
3346  g_atomCount=1;
3347  BEGIN( VariableAtom );
3348  }
3349  YY_BREAK
3350 case 115:
3352 #line 1264 "pyscanner.l"
3353 { // list
3354  if (g_start_init) current->type = "list";
3356  g_atomStart='[';
3357  g_atomEnd=']';
3358  g_atomCount=1;
3359  BEGIN( VariableAtom );
3360  }
3361  YY_BREAK
3362 case 116:
3364 #line 1272 "pyscanner.l"
3365 { // dictionary
3366  if (g_start_init) current->type = "dictionary";
3368  g_atomStart='{';
3369  g_atomEnd='}';
3370  g_atomCount=1;
3371  BEGIN( VariableAtom );
3372  }
3373  YY_BREAK
3374 case 117:
3376 #line 1280 "pyscanner.l"
3377 { // comment
3378  BEGIN( VariableEnd );
3379  }
3380  YY_BREAK
3381 case 118:
3383 #line 1283 "pyscanner.l"
3384 {
3385  g_start_init = FALSE;
3387  }
3388  YY_BREAK
3389 case 119:
3391 #line 1287 "pyscanner.l"
3392 {
3393  g_start_init = FALSE;
3395  }
3396  YY_BREAK
3397 case 120:
3398 /* rule 120 can match eol */
3400 #line 1291 "pyscanner.l"
3401 {
3402  unput('\n');
3403  BEGIN( VariableEnd );
3404  }
3405  YY_BREAK
3406 
3407 
3408 case 121:
3410 #line 1298 "pyscanner.l"
3411 {
3413  if (g_atomStart==*pyscannerYYtext)
3414  {
3415  g_atomCount++;
3416  }
3417  }
3418  YY_BREAK
3419 case 122:
3421 #line 1305 "pyscanner.l"
3422 {
3424  if (g_atomEnd==*pyscannerYYtext)
3425  {
3426  g_atomCount--;
3427  }
3428  if (g_atomCount==0)
3429  {
3430  g_start_init = FALSE;
3431  BEGIN(VariableDec);
3432  }
3433  }
3434  YY_BREAK
3435 case 123:
3437 #line 1317 "pyscanner.l"
3438 { // start of a comment block
3443  }
3444  YY_BREAK
3445 case 124:
3447 #line 1324 "pyscanner.l"
3448 { // start of a comment block
3453  }
3454  YY_BREAK
3455 case 125:
3457 #line 1330 "pyscanner.l"
3458 {
3460  current->initializer+="'";
3463  }
3464  YY_BREAK
3465 case 126:
3467 #line 1336 "pyscanner.l"
3468 {
3470  current->initializer+="\"";
3473  }
3474  YY_BREAK
3475 case 127:
3477 #line 1342 "pyscanner.l"
3478 {
3480  }
3481  YY_BREAK
3482 case 128:
3484 #line 1345 "pyscanner.l"
3485 {
3487  }
3488  YY_BREAK
3489 case 129:
3490 /* rule 129 can match eol */
3492 #line 1348 "pyscanner.l"
3493 {
3495  incLineNr();
3496  }
3497  YY_BREAK
3498 
3499 
3500 case 130:
3501 /* rule 130 can match eol */
3503 #line 1356 "pyscanner.l"
3504 {
3505  incLineNr();
3506  newVariable();
3507  BEGIN(Search);
3508  }
3509  YY_BREAK
3510 case 131:
3512 #line 1361 "pyscanner.l"
3513 {
3514  unput(*pyscannerYYtext);
3515  newVariable();
3516  BEGIN(Search);
3517  }
3518  YY_BREAK
3520 #line 1366 "pyscanner.l"
3521 { yyterminate();
3522  newEntry();
3523  }
3524  YY_BREAK
3525 
3526 
3527 case 132:
3528 #line 1373 "pyscanner.l"
3529 case 133:
3531 #line 1373 "pyscanner.l"
3532 {
3533  // printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock);
3534  if (g_doubleQuote==(pyscannerYYtext[0]=='"'))
3535  {
3536  if (g_specialBlock) // expecting a docstring
3537  {
3538  QCString actualDoc=docBlock;
3539  if (!docBlockSpecial) // legacy unformatted docstring
3540  {
3541  actualDoc.prepend("\\verbatim ");
3542  actualDoc.append("\\endverbatim ");
3543  }
3544  //printf("-------> current=%p bodyEntry=%p\n",current,bodyEntry);
3545  handleCommentBlock(actualDoc, FALSE);
3546  }
3547  else if (g_packageCommentAllowed) // expecting module docs
3548  {
3549  QCString actualDoc=docBlock;
3550  if (!docBlockSpecial) // legacy unformatted docstring
3551  {
3552  actualDoc.prepend("\\verbatim ");
3553  actualDoc.append("\\endverbatim ");
3554  }
3555  actualDoc.prepend("\\namespace "+g_moduleScope+"\\_linebr ");
3556  handleCommentBlock(actualDoc, FALSE);
3557  }
3558  if ((docBlockContext==ClassBody /*&& !g_hideClassDocs*/) ||
3560  {
3563  }
3564  //if (g_hideClassDocs)
3565  //{
3566  // current->startLine = yyLineNr;
3567  //}
3568  //g_hideClassDocs=FALSE;
3570  }
3571  else
3572  {
3574  }
3576  }
3577  YY_BREAK
3578 case 134:
3580 #line 1420 "pyscanner.l"
3581 { // leading whitespace
3582  int indent = computeIndent(pyscannerYYtext);
3583  if (indent>=g_curIndent)
3584  { // strip g_curIndent amount of whitespace
3585  int i;
3586  for (i=0;i<indent-g_curIndent;i++) docBlock+=' ';
3587  DBG_CTX((stderr,"stripping indent %d\n",g_curIndent));
3588  }
3589  else
3590  {
3591  DBG_CTX((stderr,"not stripping: %d<%d\n",indent,g_curIndent));
3593  }
3594  }
3595  YY_BREAK
3596 case 135:
3598 #line 1434 "pyscanner.l"
3599 {
3601  }
3602  YY_BREAK
3603 case 136:
3604 /* rule 136 can match eol */
3606 #line 1437 "pyscanner.l"
3607 {
3608  incLineNr();
3610  }
3611  YY_BREAK
3612 case 137:
3614 #line 1441 "pyscanner.l"
3615 { // espaced char
3617  }
3618  YY_BREAK
3619 case 138:
3621 #line 1444 "pyscanner.l"
3622 {
3624  }
3625  YY_BREAK
3626 
3627 
3628 case 139:
3630 #line 1450 "pyscanner.l"
3631 { // skip leading hashes
3632  }
3633  YY_BREAK
3634 case 140:
3635 /* rule 140 can match eol */
3636 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */
3637 (yy_c_buf_p) = yy_cp = yy_bp + 1;
3638 YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */
3640 #line 1452 "pyscanner.l"
3641 { // continuation of the comment on the next line
3642  docBlock+='\n';
3643  docBrief = FALSE;
3645  incLineNr();
3646  }
3647  YY_BREAK
3648 case 141:
3650 #line 1458 "pyscanner.l"
3651 { // any other stuff
3653  }
3654  YY_BREAK
3655 case 142:
3656 /* rule 142 can match eol */
3658 #line 1461 "pyscanner.l"
3659 { // new line that ends the comment
3661  incLineNr();
3663  }
3664  YY_BREAK
3665 case 143:
3667 #line 1466 "pyscanner.l"
3668 { // anything we missed
3670  }
3671  YY_BREAK
3672 
3673 
3674 case 144:
3675 /* rule 144 can match eol */
3677 #line 1472 "pyscanner.l"
3678 { // line continuation
3679  addToString(pyscannerYYtext);
3680  incLineNr();
3681  }
3682  YY_BREAK
3683 case 145:
3685 #line 1476 "pyscanner.l"
3686 { // espaced char
3687  addToString(pyscannerYYtext);
3688  }
3689  YY_BREAK
3690 case 146:
3692 #line 1479 "pyscanner.l"
3693 { // tripple double quotes
3694  addToString(pyscannerYYtext);
3695  }
3696  YY_BREAK
3697 case 147:
3699 #line 1482 "pyscanner.l"
3700 { // end of the string
3701  addToString(pyscannerYYtext);
3703  }
3704  YY_BREAK
3705 case 148:
3707 #line 1486 "pyscanner.l"
3708 { // normal chars
3709  addToString(pyscannerYYtext);
3710  }
3711  YY_BREAK
3712 case 149:
3714 #line 1489 "pyscanner.l"
3715 { // normal char
3716  addToString(pyscannerYYtext);
3717  }
3718  YY_BREAK
3719 
3720 
3721 case 150:
3722 /* rule 150 can match eol */
3724 #line 1495 "pyscanner.l"
3725 { // line continuation
3726  addToString(pyscannerYYtext);
3727  incLineNr();
3728  }
3729  YY_BREAK
3730 case 151:
3732 #line 1499 "pyscanner.l"
3733 { // espaced char
3734  addToString(pyscannerYYtext);
3735  }
3736  YY_BREAK
3737 case 152:
3739 #line 1502 "pyscanner.l"
3740 { // tripple single quotes
3741  addToString(pyscannerYYtext);
3742  }
3743  YY_BREAK
3744 case 153:
3746 #line 1505 "pyscanner.l"
3747 { // end of the string
3748  addToString(pyscannerYYtext);
3750  }
3751  YY_BREAK
3752 case 154:
3754 #line 1509 "pyscanner.l"
3755 { // normal chars
3756  addToString(pyscannerYYtext);
3757  }
3758  YY_BREAK
3759 case 155:
3761 #line 1512 "pyscanner.l"
3762 { // normal char
3763  addToString(pyscannerYYtext);
3764  }
3765  YY_BREAK
3766 
3767 
3768 case 156:
3769 #line 1519 "pyscanner.l"
3770 case 157:
3772 #line 1519 "pyscanner.l"
3773 {
3775  if (g_doubleQuote==(pyscannerYYtext[0]=='"'))
3776  {
3778  }
3779  }
3780  YY_BREAK
3781 case 158:
3782 /* rule 158 can match eol */
3784 #line 1528 "pyscanner.l"
3785 {
3786  lineCount();
3788  }
3789  YY_BREAK
3790 case 159:
3791 /* rule 159 can match eol */
3793 #line 1532 "pyscanner.l"
3794 {
3795  incLineNr();
3797  }
3798  YY_BREAK
3799 case 160:
3801 #line 1536 "pyscanner.l"
3802 {
3804  }
3805  YY_BREAK
3806 
3807 /* ------------ End rules -------------- */
3808 /*
3809 <*>({NONEMPTY}|{EXPCHAR}|{BB}) { // This should go one character at a time.
3810  // printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n",
3811  // pyscannerYYtext, YY_START, yyLineNr);
3812 
3813  }
3814  */
3815 case 161:
3816 /* rule 161 can match eol */
3818 #line 1551 "pyscanner.l"
3819 {
3820  //printf("[pyscanner] %d NEWLINE [line %d] no match\n",
3821  // YY_START, yyLineNr);
3822 
3823  lineCount();
3824  }
3825  YY_BREAK
3826 case 162:
3828 #line 1558 "pyscanner.l"
3829 {
3830  //printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n",
3831  // pyscannerYYtext, YY_START, yyLineNr);
3832 
3833  }
3834  YY_BREAK
3835 case 163:
3837 #line 1565 "pyscanner.l"
3838 ECHO;
3839  YY_BREAK
3840 #line 3841 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/pyscanner.cpp"
3841  case YY_STATE_EOF(INITIAL):
3842  case YY_STATE_EOF(Search):
3843  case YY_STATE_EOF(SearchMemVars):
3844  case YY_STATE_EOF(TryClassDocString):
3845  case YY_STATE_EOF(TripleComment):
3846  case YY_STATE_EOF(SpecialComment):
3847  case YY_STATE_EOF(FunctionDec):
3848  case YY_STATE_EOF(FunctionParams):
3849  case YY_STATE_EOF(FunctionParamDefVal):
3850  case YY_STATE_EOF(ClassDec):
3851  case YY_STATE_EOF(ClassInheritance):
3852  case YY_STATE_EOF(ClassCaptureIndent):
3853  case YY_STATE_EOF(VariableDec):
3854  case YY_STATE_EOF(VariableAtom):
3855  case YY_STATE_EOF(SingleQuoteString):
3856  case YY_STATE_EOF(DoubleQuoteString):
3857  case YY_STATE_EOF(TripleString):
3858  case YY_STATE_EOF(FromMod):
3859  case YY_STATE_EOF(FromModItem):
3860  case YY_STATE_EOF(Import):
3861  yyterminate();
3862 
3863  case YY_END_OF_BUFFER:
3864  {
3865  /* Amount of text matched not including the EOB char. */
3866  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
3867 
3868  /* Undo the effects of YY_DO_BEFORE_ACTION. */
3869  *yy_cp = (yy_hold_char);
3871 
3872  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3873  {
3874  /* We're scanning a new file or input source. It's
3875  * possible that this happened because the user
3876  * just pointed pyscannerYYin at a new source and called
3877  * pyscannerYYlex(). If so, then we have to assure
3878  * consistency between YY_CURRENT_BUFFER and our
3879  * globals. Here is the right place to do so, because
3880  * this is the first action (other than possibly a
3881  * back-up) that will match for the new input source.
3882  */
3883  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3884  YY_CURRENT_BUFFER_LVALUE->yy_input_file = pyscannerYYin;
3885  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3886  }
3887 
3888  /* Note that here we test for yy_c_buf_p "<=" to the position
3889  * of the first EOB in the buffer, since yy_c_buf_p will
3890  * already have been incremented past the NUL character
3891  * (since all states make transitions on EOB to the
3892  * end-of-buffer state). Contrast this with the test
3893  * in input().
3894  */
3895  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3896  { /* This was really a NUL. */
3897  yy_state_type yy_next_state;
3898 
3899  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3900 
3901  yy_current_state = yy_get_previous_state( );
3902 
3903  /* Okay, we're now positioned to make the NUL
3904  * transition. We couldn't have
3905  * yy_get_previous_state() go ahead and do it
3906  * for us because it doesn't know how to deal
3907  * with the possibility of jamming (and we don't
3908  * want to build jamming into it because then it
3909  * will run more slowly).
3910  */
3911 
3912  yy_next_state = yy_try_NUL_trans( yy_current_state );
3913 
3915 
3916  if ( yy_next_state )
3917  {
3918  /* Consume the NUL. */
3919  yy_cp = ++(yy_c_buf_p);
3920  yy_current_state = yy_next_state;
3921  goto yy_match;
3922  }
3923 
3924  else
3925  {
3926  yy_cp = (yy_c_buf_p);
3927  goto yy_find_action;
3928  }
3929  }
3930 
3931  else switch ( yy_get_next_buffer( ) )
3932  {
3933  case EOB_ACT_END_OF_FILE:
3934  {
3936 
3937  if ( pyscannerYYwrap( ) )
3938  {
3939  /* Note: because we've taken care in
3940  * yy_get_next_buffer() to have set up
3941  * pyscannerYYtext, we can now set up
3942  * yy_c_buf_p so that if some total
3943  * hoser (like flex itself) wants to
3944  * call the scanner after we return the
3945  * YY_NULL, it'll still work - another
3946  * YY_NULL will get returned.
3947  */
3949 
3951  goto do_action;
3952  }
3953 
3954  else
3955  {
3956  if ( ! (yy_did_buffer_switch_on_eof) )
3957  YY_NEW_FILE;
3958  }
3959  break;
3960  }
3961 
3962  case EOB_ACT_CONTINUE_SCAN:
3963  (yy_c_buf_p) =
3964  (yytext_ptr) + yy_amount_of_matched_text;
3965 
3966  yy_current_state = yy_get_previous_state( );
3967 
3968  yy_cp = (yy_c_buf_p);
3970  goto yy_match;
3971 
3972  case EOB_ACT_LAST_MATCH:
3973  (yy_c_buf_p) =
3974  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3975 
3976  yy_current_state = yy_get_previous_state( );
3977 
3978  yy_cp = (yy_c_buf_p);
3980  goto yy_find_action;
3981  }
3982  break;
3983  }
3984 
3985  default:
3987  "fatal flex scanner internal error--no action found" );
3988  } /* end of action switch */
3989  } /* end of scanning one token */
QGString program
the program text
Definition: entry.h:256
QCString type
Definition: arguments.h:67
static int yy_full_lp
Definition: pyscanner.cpp:1352
#define TryClassDocString
Definition: pyscanner.cpp:1851
bool resize(uint newlen)
Definition: qcstring.h:225
static yyconst flex_int16_t yy_acclist[881]
Definition: pyscanner.cpp:394
#define Import
Definition: pyscanner.cpp:1870
#define YY_AT_BOL()
Definition: pyscanner.cpp:350
#define TripleString
Definition: pyscanner.cpp:1867
static yyconst flex_int32_t yy_ec[256]
Definition: pyscanner.cpp:553
#define VariableAtom
Definition: pyscanner.cpp:1864
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
#define YY_MORE_ADJ
Definition: pyscanner.cpp:1368
#define FunctionBody
Definition: pyscanner.cpp:1856
#define YY_FATAL_ERROR(msg)
Definition: pyscanner.cpp:2011
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
static void endOfDef(int correction=0)
Definition: pyscanner.cpp:1718
#define YY_BUFFER_NEW
Definition: pyscanner.cpp:254
#define VariableDec
Definition: pyscanner.cpp:1862
#define FunctionParamDefVal
Definition: pyscanner.cpp:1857
static bool docBrief
Definition: pyscanner.cpp:1456
bool isEmpty() const
Definition: qcstring.h:189
#define REJECT
Definition: pyscanner.cpp:1356
static QCString g_packageName
Definition: pyscanner.cpp:1475
void append(const type *d)
Definition: qlist.h:73
static void addToString(const char *s)
Definition: pyscanner.cpp:1730
static bool g_packageCommentAllowed
Definition: pyscanner.cpp:1483
Definition: entry.h:63
Definition: types.h:26
static bool docBlockInBody
Definition: pyscanner.cpp:1454
static char * yy_full_match
Definition: pyscanner.cpp:1349
#define EOB_ACT_END_OF_FILE
Definition: pyscanner.cpp:180
QCString defval
Definition: arguments.h:71
char & at(uint i) const
Definition: qcstring.h:326
static int computeIndent(const char *s)
Definition: pyscanner.cpp:1550
QCString argListToString(ArgumentList *al, bool useCanonicalType, bool showDefVals)
Definition: util.cpp:2151
#define YY_TRAILING_HEAD_MASK
Definition: pyscanner.cpp:1355
static void initTriSingleQuoteBlock()
Definition: pyscanner.cpp:1746
#define YY_BUFFER_NORMAL
Definition: pyscanner.cpp:255
static QGString * g_copyString
Definition: pyscanner.cpp:1462
static int g_stringContext
Definition: pyscanner.cpp:1461
const bool FALSE
Definition: qglobal.h:370
Definition: types.h:26
ArgumentList * argList
member arguments as a list
Definition: entry.h:254
static char g_atomStart
Definition: pyscanner.cpp:1468
#define EOB_ACT_CONTINUE_SCAN
Definition: pyscanner.cpp:179
void addSubEntry(Entry *e)
Definition: entry.cpp:206
QCString name
member name
Definition: entry.h:237
bool resize(uint newlen)
Definition: qgstring.cpp:96
static void initEntry()
Definition: pyscanner.cpp:1502
register char * yy_cp
Definition: pyscanner.cpp:2050
static void handleCommentBlock(const QCString &doc, bool brief)
Definition: pyscanner.cpp:1676
#define FunctionDec
Definition: pyscanner.cpp:1854
static char yy_hold_char
Definition: pyscanner.cpp:292
int yy_state_type
Definition: code.cpp:361
#define ClassBody
Definition: pyscanner.cpp:1861
#define SingleQuoteString
Definition: pyscanner.cpp:1865
int pyscannerYYleng
Definition: pyscanner.cpp:294
Definition: types.h:29
#define VariableEnd
Definition: pyscanner.cpp:1863
#define YY_RULE_SETUP
Definition: pyscanner.cpp:2039
#define YY_DO_BEFORE_ACTION
Definition: pyscanner.cpp:378
#define unput(c)
Definition: pyscanner.cpp:199
#define Search
Definition: pyscanner.cpp:1849
char * pyscannerYYtext
Definition: pyscanner.cpp:1370
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
static void searchFoundDef()
Definition: pyscanner.cpp:1767
#define FunctionParams
Definition: pyscanner.cpp:1855
#define YY_END_OF_BUFFER
Definition: pyscanner.cpp:386
static void searchFoundClass()
Definition: pyscanner.cpp:1786
type * getLast() const
Definition: qlist.h:96
static yyconst flex_int16_t yy_base[603]
Definition: pyscanner.cpp:595
static yyconst flex_int16_t yy_accept[497]
Definition: pyscanner.cpp:494
#define YY_TRAILING_MASK
Definition: pyscanner.cpp:1354
QGString initializer
initial value (for variables)
Definition: entry.h:257
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
Definition: pyscanner.cpp:4136
#define YY_NEW_FILE
Definition: pyscanner.cpp:157
static char g_atomEnd
Definition: pyscanner.cpp:1469
static int yy_lp
Definition: pyscanner.cpp:1350
#define YY_BREAK
Definition: pyscanner.cpp:2036
#define pyscannerYYwrap(n)
Definition: pyscanner.cpp:354
static void startCommentBlock(bool brief)
Definition: pyscanner.cpp:1653
#define yyterminate()
Definition: pyscanner.cpp:2001
const double a
static bool docBlockSpecial
Definition: pyscanner.cpp:1457
#define DoubleQuoteString
Definition: pyscanner.cpp:1866
static QCString yyFileName
Definition: pyscanner.cpp:1447
static void lineCount()
Definition: pyscanner.cpp:1600
int startLine
start line of entry in the source
Definition: entry.h:283
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
#define YY_RESTORE_YY_MORE_OFFSET
Definition: pyscanner.cpp:1369
#define DBG_CTX(x)
Definition: pyscanner.cpp:1424
QCString args
member argument string
Definition: entry.h:252
static int yy_get_next_buffer(void)
Definition: pyscanner.cpp:3999
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
#define SearchMemVars
Definition: pyscanner.cpp:1850
const char * data() const
Definition: qcstring.h:207
static int g_atomCount
Definition: pyscanner.cpp:1470
#define EOB_ACT_LAST_MATCH
Definition: pyscanner.cpp:181
static Entry * current_root
Definition: pyscanner.cpp:1442
Protection protection
class protection
Definition: entry.h:241
#define ClassDec
Definition: pyscanner.cpp:1858
unsigned char YY_CHAR
Definition: code.cpp:357
#define FromMod
Definition: pyscanner.cpp:1868
register char * yy_bp
Definition: pyscanner.cpp:2050
#define INITIAL
Definition: pyscanner.cpp:1848
static bool docBlockJavaStyle
Definition: pyscanner.cpp:1455
static bool g_specialBlock
Definition: pyscanner.cpp:1460
static void initSpecialBlock()
Definition: pyscanner.cpp:1757
#define YY_START
Definition: pyscanner.cpp:150
static QCString g_moduleScope
Definition: pyscanner.cpp:1474
#define YY_SC_TO_UI(c)
Definition: pyscanner.cpp:138
static yy_state_type * yy_state_ptr
Definition: pyscanner.cpp:1348
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:1655
static yyconst flex_int16_t yy_nxt[2725]
Definition: pyscanner.cpp:737
static int yyLineNr
Definition: pyscanner.cpp:1446
static void newFunction()
Definition: pyscanner.cpp:1536
#define SpecialComment
Definition: pyscanner.cpp:1853
static void initTriDoubleQuoteBlock()
Definition: pyscanner.cpp:1735
static yy_state_type * yy_state_buf
Definition: pyscanner.cpp:1348
#define yytext_ptr
Definition: pyscanner.cpp:368
static QCString docBlock
Definition: pyscanner.cpp:1453
static bool g_doubleQuote
Definition: pyscanner.cpp:1459
static char * yy_c_buf_p
Definition: pyscanner.cpp:297
static yyconst flex_int16_t yy_def[603]
Definition: pyscanner.cpp:666
static yyconst flex_int32_t yy_meta[53]
Definition: pyscanner.cpp:585
#define TripleComment
Definition: pyscanner.cpp:1852
static int docBlockContext
Definition: pyscanner.cpp:1452
QCString name
Definition: arguments.h:69
void line(double t, double *p, double &x, double &y, double &z)
static Entry * current
Definition: pyscanner.cpp:1443
#define ClassInheritance
Definition: pyscanner.cpp:1859
QCString fileName
file this entry was extracted from
Definition: entry.h:282
#define BEGIN
Definition: pyscanner.cpp:144
static int g_braceCount
Definition: pyscanner.cpp:1480
register int yy_act
Definition: pyscanner.cpp:2051
MethodTypes mtype
signal, slot, (dcop) method, or property?
Definition: entry.h:242
static int yy_did_buffer_switch_on_eof
Definition: pyscanner.cpp:304
static int g_search_count
Definition: pyscanner.cpp:1486
static Entry * bodyEntry
Definition: pyscanner.cpp:1445
#define FromModItem
Definition: pyscanner.cpp:1869
#define ClassCaptureIndent
Definition: pyscanner.cpp:1860
static bool g_start_init
Definition: pyscanner.cpp:1485
static int g_indent
Definition: pyscanner.cpp:1463
static bool gstat
Definition: pyscanner.cpp:1449
static yyconst flex_int16_t yy_chk[2725]
Definition: pyscanner.cpp:1041
static yy_state_type yy_get_previous_state(void)
Definition: pyscanner.cpp:4104
#define YY_STATE_EOF(state)
Definition: pyscanner.cpp:154
static int yy_looking_for_trail_begin
Definition: pyscanner.cpp:1351
static void newVariable()
Definition: pyscanner.cpp:1523
static int yy_n_chars
Definition: pyscanner.cpp:293
static int g_curIndent
Definition: pyscanner.cpp:1464
Definition: entry.h:37
static QCString g_defVal
Definition: pyscanner.cpp:1479
#define ECHO
Definition: pyscanner.cpp:1957
static int yy_start
Definition: pyscanner.cpp:299
static void incLineNr()
Definition: pyscanner.cpp:1609
static int * yy_full_state
Definition: pyscanner.cpp:1353
Definition: types.h:32
const bool TRUE
Definition: qglobal.h:371
static void newEntry()
Definition: pyscanner.cpp:1515
QList< BaseInfo > * extends
list of base classes
Definition: entry.h:279
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
QCString & append(const char *s)
Definition: qcstring.cpp:383
QCString type
member type
Definition: entry.h:236
int section
entry type (see Sections);
Definition: entry.h:235
int bodyLine
line number of the definition in the source
Definition: entry.h:276
static void yy_fatal_error ( yyconst char  msg[])
static
static void yy_fatal_error ( yyconst char *  msg)
static

Definition at line 4621 of file pyscanner.cpp.

4622 {
4623  (void) fprintf( stderr, "%s\n", msg );
4624  exit( YY_EXIT_FAILURE );
4625 }
void msg(const char *fmt,...)
Definition: message.cpp:107
#define YY_EXIT_FAILURE
Definition: pyscanner.cpp:4618
static int yy_get_next_buffer ( void  )
static

Definition at line 3999 of file pyscanner.cpp.

4000 {
4001  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
4002  register char *source = (yytext_ptr);
4003  register int number_to_move, i;
4004  int ret_val;
4005 
4006  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
4008  "fatal flex scanner internal error--end of buffer missed" );
4009 
4010  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
4011  { /* Don't try to fill the buffer, so this is an EOF. */
4012  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
4013  {
4014  /* We matched a single character, the EOB, so
4015  * treat this as a final EOF.
4016  */
4017  return EOB_ACT_END_OF_FILE;
4018  }
4019 
4020  else
4021  {
4022  /* We matched some text prior to the EOB, first
4023  * process it.
4024  */
4025  return EOB_ACT_LAST_MATCH;
4026  }
4027  }
4028 
4029  /* Try to read more data. */
4030 
4031  /* First move last chars to start of buffer. */
4032  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
4033 
4034  for ( i = 0; i < number_to_move; ++i )
4035  *(dest++) = *(source++);
4036 
4037  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
4038  /* don't do the read, it's not guaranteed to return an EOF,
4039  * just force an EOF
4040  */
4041  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
4042 
4043  else
4044  {
4045  int num_to_read =
4046  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
4047 
4048  while ( num_to_read <= 0 )
4049  { /* Not enough room in the buffer - grow it. */
4050 
4052 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
4053 
4054  }
4055 
4056  if ( num_to_read > YY_READ_BUF_SIZE )
4057  num_to_read = YY_READ_BUF_SIZE;
4058 
4059  /* Read in more data. */
4060  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
4061  (yy_n_chars), (size_t) num_to_read );
4062 
4063  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4064  }
4065 
4066  if ( (yy_n_chars) == 0 )
4067  {
4068  if ( number_to_move == YY_MORE_ADJ )
4069  {
4070  ret_val = EOB_ACT_END_OF_FILE;
4072  }
4073 
4074  else
4075  {
4076  ret_val = EOB_ACT_LAST_MATCH;
4077  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
4079  }
4080  }
4081 
4082  else
4083  ret_val = EOB_ACT_CONTINUE_SCAN;
4084 
4085  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
4086  /* Extend the array by 50%, plus the number we really need. */
4087  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
4088  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pyscannerYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
4089  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
4090  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
4091  }
4092 
4093  (yy_n_chars) += number_to_move;
4096 
4097  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
4098 
4099  return ret_val;
4100 }
#define YY_BUFFER_EOF_PENDING
Definition: pyscanner.cpp:266
#define YY_MORE_ADJ
Definition: pyscanner.cpp:1368
void * pyscannerYYrealloc(void *, yy_size_t)
Definition: pyscanner.cpp:4811
void pyscannerYYrestart(FILE *input_file)
Definition: pyscanner.cpp:4273
#define YY_FATAL_ERROR(msg)
Definition: pyscanner.cpp:2011
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
#define YY_READ_BUF_SIZE
Definition: pyscanner.cpp:1949
#define EOB_ACT_END_OF_FILE
Definition: pyscanner.cpp:180
#define EOB_ACT_CONTINUE_SCAN
Definition: pyscanner.cpp:179
#define YY_END_OF_BUFFER_CHAR
Definition: pyscanner.cpp:159
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
#define EOB_ACT_LAST_MATCH
Definition: pyscanner.cpp:181
#define yytext_ptr
Definition: pyscanner.cpp:368
static char * yy_c_buf_p
Definition: pyscanner.cpp:297
static int yy_n_chars
Definition: pyscanner.cpp:293
size_t yy_size_t
Definition: code.cpp:203
#define YY_INPUT(buf, result, max_size)
Definition: pyscanner.cpp:1800
static yy_state_type yy_get_previous_state ( void  )
static

Definition at line 4104 of file pyscanner.cpp.

4105 {
4106  register yy_state_type yy_current_state;
4107  register char *yy_cp;
4108 
4109  yy_current_state = (yy_start);
4110  yy_current_state += YY_AT_BOL();
4111 
4112  (yy_state_ptr) = (yy_state_buf);
4113  *(yy_state_ptr)++ = yy_current_state;
4114 
4115  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
4116  {
4117  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
4118  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4119  {
4120  yy_current_state = (int) yy_def[yy_current_state];
4121  if ( yy_current_state >= 496 )
4122  yy_c = yy_meta[(unsigned int) yy_c];
4123  }
4124  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4125  *(yy_state_ptr)++ = yy_current_state;
4126  }
4127 
4128  return yy_current_state;
4129 }
#define YY_AT_BOL()
Definition: pyscanner.cpp:350
static yyconst flex_int32_t yy_ec[256]
Definition: pyscanner.cpp:553
#define YY_MORE_ADJ
Definition: pyscanner.cpp:1368
register char * yy_cp
Definition: pyscanner.cpp:2050
int yy_state_type
Definition: code.cpp:361
static yyconst flex_int16_t yy_base[603]
Definition: pyscanner.cpp:595
unsigned char YY_CHAR
Definition: code.cpp:357
#define YY_SC_TO_UI(c)
Definition: pyscanner.cpp:138
static yy_state_type * yy_state_ptr
Definition: pyscanner.cpp:1348
static yyconst flex_int16_t yy_nxt[2725]
Definition: pyscanner.cpp:737
static yy_state_type * yy_state_buf
Definition: pyscanner.cpp:1348
#define yytext_ptr
Definition: pyscanner.cpp:368
static char * yy_c_buf_p
Definition: pyscanner.cpp:297
static yyconst flex_int16_t yy_def[603]
Definition: pyscanner.cpp:666
static yyconst flex_int32_t yy_meta[53]
Definition: pyscanner.cpp:585
static yyconst flex_int16_t yy_chk[2725]
Definition: pyscanner.cpp:1041
static int yy_start
Definition: pyscanner.cpp:299
static int yy_init_globals ( void  )
static

Definition at line 4724 of file pyscanner.cpp.

4725 {
4726  /* Initialization is the same as for the non-reentrant scanner.
4727  * This function is called from pyscannerYYlex_destroy(), so don't allocate here.
4728  */
4729 
4730  (yy_buffer_stack) = 0;
4731  (yy_buffer_stack_top) = 0;
4732  (yy_buffer_stack_max) = 0;
4733  (yy_c_buf_p) = (char *) 0;
4734  (yy_init) = 0;
4735  (yy_start) = 0;
4736 
4737  (yy_state_buf) = 0;
4738  (yy_state_ptr) = 0;
4739  (yy_full_match) = 0;
4740  (yy_lp) = 0;
4741 
4742 /* Defined in main.c */
4743 #ifdef YY_STDINIT
4744  pyscannerYYin = stdin;
4746 #else
4747  pyscannerYYin = (FILE *) 0;
4748  pyscannerYYout = (FILE *) 0;
4749 #endif
4750 
4751  /* For future reference: Set errno on error, since we are called by
4752  * pyscannerYYlex_init()
4753  */
4754  return 0;
4755 }
FILE * pyscannerYYin
Definition: pyscanner.cpp:359
static int yy_init
Definition: pyscanner.cpp:298
static YY_BUFFER_STATE * yy_buffer_stack
Definition: pyscanner.cpp:274
static size_t yy_buffer_stack_top
Definition: pyscanner.cpp:272
static char * yy_full_match
Definition: pyscanner.cpp:1349
FILE * pyscannerYYout
Definition: pyscanner.cpp:359
static int yy_lp
Definition: pyscanner.cpp:1350
static yy_state_type * yy_state_ptr
Definition: pyscanner.cpp:1348
static yy_state_type * yy_state_buf
Definition: pyscanner.cpp:1348
static size_t yy_buffer_stack_max
Definition: pyscanner.cpp:273
static char * yy_c_buf_p
Definition: pyscanner.cpp:297
static int yy_start
Definition: pyscanner.cpp:299
static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state)
static

Definition at line 4136 of file pyscanner.cpp.

4137 {
4138  register int yy_is_jam;
4139 
4140  register YY_CHAR yy_c = 1;
4141  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4142  {
4143  yy_current_state = (int) yy_def[yy_current_state];
4144  if ( yy_current_state >= 496 )
4145  yy_c = yy_meta[(unsigned int) yy_c];
4146  }
4147  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4148  yy_is_jam = (yy_current_state == 495);
4149  if ( ! yy_is_jam )
4150  *(yy_state_ptr)++ = yy_current_state;
4151 
4152  return yy_is_jam ? 0 : yy_current_state;
4153 }
static yyconst flex_int16_t yy_base[603]
Definition: pyscanner.cpp:595
unsigned char YY_CHAR
Definition: code.cpp:357
static yy_state_type * yy_state_ptr
Definition: pyscanner.cpp:1348
static yyconst flex_int16_t yy_nxt[2725]
Definition: pyscanner.cpp:737
static yyconst flex_int16_t yy_def[603]
Definition: pyscanner.cpp:666
static yyconst flex_int32_t yy_meta[53]
Definition: pyscanner.cpp:585
static yyconst flex_int16_t yy_chk[2725]
Definition: pyscanner.cpp:1041
static int yyread ( char *  buf,
int  max_size 
)
static

Definition at line 1802 of file pyscanner.cpp.

1803 {
1804  int c=0;
1805  while ( c < max_size && inputString[inputPosition] )
1806  {
1807  *buf = inputString[inputPosition++] ;
1808  //printf("%d (%c)\n",*buf,*buf);
1809  c++; buf++;
1810  }
1811  return c;
1812 }
static int inputPosition
Definition: pyscanner.cpp:1437
static const char * inputString
Definition: pyscanner.cpp:1436
static void yyunput ( int  c,
char *  buf_ptr 
)
static
static void yyunput ( int  c,
register char *  yy_bp 
)
static

Definition at line 4155 of file pyscanner.cpp.

4156 {
4157  register char *yy_cp;
4158 
4159  yy_cp = (yy_c_buf_p);
4160 
4161  /* undo effects of setting up pyscannerYYtext */
4162  *yy_cp = (yy_hold_char);
4163 
4164  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
4165  { /* need to shift things up to make room */
4166  /* +2 for EOB chars. */
4167  register int number_to_move = (yy_n_chars) + 2;
4168  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
4169  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
4170  register char *source =
4171  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
4172 
4173  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
4174  *--dest = *--source;
4175 
4176  yy_cp += (int) (dest - source);
4177  yy_bp += (int) (dest - source);
4178  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
4179  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
4180 
4181  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
4182  YY_FATAL_ERROR( "flex scanner push-back overflow" );
4183  }
4184 
4185  *--yy_cp = (char) c;
4186 
4187  (yytext_ptr) = yy_bp;
4188  (yy_hold_char) = *yy_cp;
4189  (yy_c_buf_p) = yy_cp;
4190 }
#define YY_FATAL_ERROR(msg)
Definition: pyscanner.cpp:2011
register char * yy_cp
Definition: pyscanner.cpp:2050
if(!(yy_init))
Definition: pyscanner.cpp:2060
static char yy_hold_char
Definition: pyscanner.cpp:292
#define YY_CURRENT_BUFFER_LVALUE
Definition: pyscanner.cpp:289
register char * yy_bp
Definition: pyscanner.cpp:2050
#define yytext_ptr
Definition: pyscanner.cpp:368
static char * yy_c_buf_p
Definition: pyscanner.cpp:297
static int yy_n_chars
Definition: pyscanner.cpp:293

Variable Documentation

Entry* bodyEntry = 0
static

Definition at line 1445 of file pyscanner.cpp.

Entry* current = 0
static

Definition at line 1443 of file pyscanner.cpp.

Entry* current_root = 0
static

Definition at line 1442 of file pyscanner.cpp.

QCString docBlock
static

Definition at line 1453 of file pyscanner.cpp.

int docBlockContext
static

Definition at line 1452 of file pyscanner.cpp.

bool docBlockInBody
static

Definition at line 1454 of file pyscanner.cpp.

bool docBlockJavaStyle
static

Definition at line 1455 of file pyscanner.cpp.

bool docBlockSpecial
static

Definition at line 1457 of file pyscanner.cpp.

bool docBrief
static

Definition at line 1456 of file pyscanner.cpp.

int g_atomCount
static

Definition at line 1470 of file pyscanner.cpp.

char g_atomEnd
static

Definition at line 1469 of file pyscanner.cpp.

char g_atomStart
static

Definition at line 1468 of file pyscanner.cpp.

int g_braceCount
static

Definition at line 1480 of file pyscanner.cpp.

QGString* g_copyString
static

Definition at line 1462 of file pyscanner.cpp.

int g_curIndent = 0
static

Definition at line 1464 of file pyscanner.cpp.

QCString g_defVal
static

Definition at line 1479 of file pyscanner.cpp.

bool g_doubleQuote
static

Definition at line 1459 of file pyscanner.cpp.

int g_indent = 0
static

Definition at line 1463 of file pyscanner.cpp.

bool g_lexInit = FALSE
static

Definition at line 1482 of file pyscanner.cpp.

QCString g_moduleScope
static

Definition at line 1474 of file pyscanner.cpp.

bool g_packageCommentAllowed
static

Definition at line 1483 of file pyscanner.cpp.

QCString g_packageName
static

Definition at line 1475 of file pyscanner.cpp.

int g_search_count = 0
static

Definition at line 1486 of file pyscanner.cpp.

bool g_specialBlock
static

Definition at line 1460 of file pyscanner.cpp.

bool g_start_init = FALSE
static

Definition at line 1485 of file pyscanner.cpp.

int g_stringContext
static

Definition at line 1461 of file pyscanner.cpp.

ParserInterface* g_thisParser
static

Definition at line 1435 of file pyscanner.cpp.

bool gstat
static

Definition at line 1449 of file pyscanner.cpp.

QFile inputFile
static

Definition at line 1438 of file pyscanner.cpp.

int inputPosition
static

Definition at line 1437 of file pyscanner.cpp.

const char* inputString
static

Definition at line 1436 of file pyscanner.cpp.

MethodTypes mtype
static

Definition at line 1448 of file pyscanner.cpp.

Entry* previous = 0
static

Definition at line 1444 of file pyscanner.cpp.

Protection protection
static

Definition at line 1440 of file pyscanner.cpp.

int pyscannerYY_flex_debug = 0

Definition at line 1346 of file pyscanner.cpp.

FILE * pyscannerYYin = (FILE *) 0

Definition at line 359 of file pyscanner.cpp.

int pyscannerYYleng

Definition at line 294 of file pyscanner.cpp.

int pyscannerYYlineno = 1

Definition at line 365 of file pyscanner.cpp.

FILE * pyscannerYYout = (FILE *) 0

Definition at line 359 of file pyscanner.cpp.

char * pyscannerYYtext

Definition at line 1370 of file pyscanner.cpp.

Specifier virt
static

Definition at line 1450 of file pyscanner.cpp.

yyconst flex_int16_t yy_accept[497]
static

Definition at line 494 of file pyscanner.cpp.

yyconst flex_int16_t yy_acclist[881]
static

Definition at line 394 of file pyscanner.cpp.

register int yy_act

Definition at line 2051 of file pyscanner.cpp.

yyconst flex_int16_t yy_base[603]
static

Definition at line 595 of file pyscanner.cpp.

register char * yy_bp

Definition at line 2050 of file pyscanner.cpp.

YY_BUFFER_STATE* yy_buffer_stack = 0
static

Stack as an array.

Definition at line 274 of file pyscanner.cpp.

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 273 of file pyscanner.cpp.

size_t yy_buffer_stack_top = 0
static

index of top of stack.

Definition at line 272 of file pyscanner.cpp.

char* yy_c_buf_p = (char *) 0
static

Definition at line 297 of file pyscanner.cpp.

yyconst flex_int16_t yy_chk[2725]
static

Definition at line 1041 of file pyscanner.cpp.

register char* yy_cp

Definition at line 2050 of file pyscanner.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 2048 of file pyscanner.cpp.

yyconst flex_int16_t yy_def[603]
static

Definition at line 666 of file pyscanner.cpp.

int yy_did_buffer_switch_on_eof
static

Definition at line 304 of file pyscanner.cpp.

yyconst flex_int32_t yy_ec[256]
static

Definition at line 553 of file pyscanner.cpp.

int yy_full_lp
static

Definition at line 1352 of file pyscanner.cpp.

char* yy_full_match
static

Definition at line 1349 of file pyscanner.cpp.

int* yy_full_state
static

Definition at line 1353 of file pyscanner.cpp.

char yy_hold_char
static

Definition at line 292 of file pyscanner.cpp.

int yy_init = 0
static

Definition at line 298 of file pyscanner.cpp.

int yy_looking_for_trail_begin = 0
static

Definition at line 1351 of file pyscanner.cpp.

int yy_lp
static

Definition at line 1350 of file pyscanner.cpp.

yyconst flex_int32_t yy_meta[53]
static
Initial value:
=
{ 0,
1, 2, 3, 1, 4, 5, 1, 4, 1, 6,
1, 1, 7, 8, 9, 9, 9, 1, 10, 1,
11, 11, 11, 12, 12, 12, 12, 12, 12, 12,
1, 13, 1, 12, 11, 11, 11, 11, 11, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
1, 14
}

Definition at line 585 of file pyscanner.cpp.

int yy_n_chars
static

Definition at line 293 of file pyscanner.cpp.

yyconst flex_int16_t yy_nxt[2725]
static

Definition at line 737 of file pyscanner.cpp.

int yy_start = 0
static

Definition at line 299 of file pyscanner.cpp.

yy_state_type* yy_state_buf =0
static

Definition at line 1348 of file pyscanner.cpp.

yy_state_type * yy_state_ptr =0
static

Definition at line 1348 of file pyscanner.cpp.

QCString yyFileName
static

Definition at line 1447 of file pyscanner.cpp.

int yyLineNr = 1
static

Definition at line 1446 of file pyscanner.cpp.