Classes | Macros | Typedefs | Enumerations | Functions | Variables
fortranscanner.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 <qmap.h>
#include "fortranscanner.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 "fortrancode.h"
#include "pre.h"
#include "arguments.h"

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 
struct  SymbolModifiers
 Holds modifiers (ie attributes) for one symbol (variable, function, etc) More...
 
struct  CommentInPrepass
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   fortranscannerYY_create_buffer
 
#define yy_delete_buffer   fortranscannerYY_delete_buffer
 
#define yy_flex_debug   fortranscannerYY_flex_debug
 
#define yy_init_buffer   fortranscannerYY_init_buffer
 
#define yy_flush_buffer   fortranscannerYY_flush_buffer
 
#define yy_load_buffer_state   fortranscannerYY_load_buffer_state
 
#define yy_switch_to_buffer   fortranscannerYY_switch_to_buffer
 
#define yyin   fortranscannerYYin
 
#define yyleng   fortranscannerYYleng
 
#define yylex   fortranscannerYYlex
 
#define yylineno   fortranscannerYYlineno
 
#define yyout   fortranscannerYYout
 
#define yyrestart   fortranscannerYYrestart
 
#define yytext   fortranscannerYYtext
 
#define yywrap   fortranscannerYYwrap
 
#define yyalloc   fortranscannerYYalloc
 
#define yyrealloc   fortranscannerYYrealloc
 
#define yyfree   fortranscannerYYfree
 
#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   fortranscannerYYrestart(fortranscannerYYin )
 
#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   fortranscannerYY_flush_buffer(YY_CURRENT_BUFFER )
 
#define yy_new_buffer   fortranscannerYY_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 fortranscannerYYwrap(n)   1
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   fortranscannerYYtext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   115
 
#define YY_END_OF_BUFFER   116
 
#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 YY_USER_ACTION   yyColNr+=(int)fortranscannerYYleng;
 
#define INITIAL   0
 
#define Subprog   1
 
#define SubprogPrefix   2
 
#define Parameterlist   3
 
#define SubprogBody   4
 
#define SubprogBodyContains   5
 
#define Start   6
 
#define Comment   7
 
#define Module   8
 
#define Program   9
 
#define ModuleBody   10
 
#define ModuleBodyContains   11
 
#define AttributeList   12
 
#define Variable   13
 
#define Initialization   14
 
#define ArrayInitializer   15
 
#define Typedef   16
 
#define TypedefBody   17
 
#define TypedefBodyContains   18
 
#define InterfaceBody   19
 
#define StrIgnore   20
 
#define String   21
 
#define Use   22
 
#define UseOnly   23
 
#define ModuleProcedure   24
 
#define Prepass   25
 
#define DocBlock   26
 
#define DocBackLine   27
 
#define EndDoc   28
 
#define BlockData   29
 
#define Prototype   30
 
#define PrototypeSubprog   31
 
#define PrototypeArgs   32
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( fortranscannerYYtext, fortranscannerYYleng, 1, fortranscannerYYout )) {} } 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 fortranscannerYYlex (void)
 
#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
 

Enumerations

enum  ScanVar { V_IGNORE, V_VARIABLE, V_PARAMETER, V_RESULT }
 
enum  InterfaceType { IF_NONE, IF_SPECIFIC, IF_GENERIC, IF_ABSTRACT }
 

Functions

void fortranscannerYYrestart (FILE *input_file)
 
void fortranscannerYY_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE fortranscannerYY_create_buffer (FILE *file, int size)
 
void fortranscannerYY_delete_buffer (YY_BUFFER_STATE b)
 
void fortranscannerYY_flush_buffer (YY_BUFFER_STATE b)
 
void fortranscannerYYpush_buffer_state (YY_BUFFER_STATE new_buffer)
 
void fortranscannerYYpop_buffer_state (void)
 
static void fortranscannerYYensure_buffer_stack (void)
 
static void fortranscannerYY_load_buffer_state (void)
 
static void fortranscannerYY_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
YY_BUFFER_STATE fortranscannerYY_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE fortranscannerYY_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE fortranscannerYY_scan_bytes (yyconst char *bytes, int len)
 
void * fortranscannerYYalloc (yy_size_t)
 
void * fortranscannerYYrealloc (void *, yy_size_t)
 
void fortranscannerYYfree (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 int yyread (char *buf, int max_size)
 
static void startCommentBlock (bool)
 
static void handleCommentBlock (const QCString &doc, bool brief)
 
static void subrHandleCommentBlock (const QCString &doc, bool brief)
 Handle parameter description as defined after the declaration of the parameter. More...
 
static void subrHandleCommentBlockResult (const QCString &doc, bool brief)
 Handle result description as defined after the declaration of the parameter. More...
 
static void addCurrentEntry (int case_insens)
 
static void addModule (const char *name, bool isModule=FALSE)
 
static void addSubprogram (const char *text)
 
static void addInterface (QCString name, InterfaceType type)
 
static ArgumentgetParameter (const QCString &name)
 
static void scanner_abort ()
 
static void startScope (Entry *scope)
 
static bool endScope (Entry *scope, bool isGlobalRoot=FALSE)
 
static void resolveModuleProcedures (QList< Entry > &moduleProcedures, Entry *current_root)
 
static int getAmpersandAtTheStart (const char *buf, int length)
 
static int getAmpOrExclAtTheEnd (const char *buf, int length)
 
static void truncatePrepass (int index)
 
static void pushBuffer (QCString &buffer)
 
static void popBuffer ()
 
static QCString extractFromParens (const QCString name)
 
static CommentInPrepasslocatePrepassComment (int from, int to)
 
static void updateVariablePrepassComment (int from, int to)
 
static void newLine ()
 
static int yy_init_globals (void)
 
int fortranscannerYYlex_destroy (void)
 
int fortranscannerYYget_debug (void)
 
void fortranscannerYYset_debug (int debug_flag)
 
YY_EXTRA_TYPE fortranscannerYYget_extra (void)
 
void fortranscannerYYset_extra (YY_EXTRA_TYPE user_defined)
 
FILE * fortranscannerYYget_in (void)
 
void fortranscannerYYset_in (FILE *in_str)
 
FILE * fortranscannerYYget_out (void)
 
void fortranscannerYYset_out (FILE *out_str)
 
int fortranscannerYYget_leng (void)
 
char * fortranscannerYYget_text (void)
 
int fortranscannerYYget_lineno (void)
 
void fortranscannerYYset_lineno (int line_number)
 
static void yyunput (int c, char *buf_ptr)
 
static void yy_push_state (int new_state)
 
static void yy_pop_state (void)
 
static int yy_top_state (void)
 
int fortranscannerYYlex (void)
 
 if (!(yy_init))
 
 while (1)
 
static void yyunput (int c, register char *yy_bp)
 
static void yy_fatal_error (yyconst char *msg)
 
static bool recognizeFixedForm (const char *contents, FortranFormat format)
 
static void insertCharacter (char *contents, int length, int pos, char c)
 
static const char * prepassFixedForm (const char *contents)
 
static void copyEntry (Entry *dest, Entry *src)
 
static ArgumentfindArgument (Entry *subprog, QCString name, bool byTypeName=FALSE)
 
static QCString applyModifiers (QCString typeName, SymbolModifiers &mdfs)
 
static void applyModifiers (Argument *arg, SymbolModifiers &mdfs)
 
static void applyModifiers (Entry *ent, SymbolModifiers &mdfs)
 
static void initParser ()
 
static void initEntry ()
 
static int max (int a, int b)
 
static void parseMain (const char *fileName, const char *fileBuf, Entry *rt, FortranFormat format)
 

Variables

int fortranscannerYYleng
 
FILE * fortranscannerYYin = (FILE *) 0
 
FILE * fortranscannerYYout = (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 fortranscannerYYlineno = 1
 
char * fortranscannerYYtext
 
static yyconst flex_int16_t yy_acclist [6178]
 
static yyconst flex_int16_t yy_accept [24249]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [72]
 
static yyconst flex_int32_t yy_base [29670]
 
static yyconst flex_int16_t yy_def [29670]
 
static yyconst flex_int16_t yy_nxt [209459]
 
static yyconst flex_int16_t yy_chk [209459]
 
int fortranscannerYY_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 const char * directionStrs []
 
static const char * directionParam []
 
static ParserInterfaceg_thisParser
 
static const char * inputString
 
static int inputPosition
 
static bool isFixedForm
 
static QCString inputStringPrepass
 Input string for prepass of line cont. '&'. More...
 
static QCString inputStringSemi
 Input string after command separetor ';'. More...
 
static unsigned int inputPositionPrepass
 
static int lineCountPrepass = 0
 
static QList< EntrysubrCurrent
 
static QList< CommentInPrepasscomments
 
YY_BUFFER_STATEinclude_stack = NULL
 
int include_stack_ptr = 0
 
int include_stack_cnt = 0
 
static QFile inputFile
 
static QCString yyFileName
 
static int yyLineNr = 1
 
static int yyColNr = 0
 
static Entrycurrent_root = 0
 
static Entryglobal_root = 0
 
static Entryfile_root = 0
 
static Entrycurrent = 0
 
static Entrylast_entry = 0
 
static ScanVar v_type = V_IGNORE
 
static QList< EntrymoduleProcedures
 
static QCString docBlock
 
static bool docBlockInBody = FALSE
 
static bool docBlockJavaStyle
 
static MethodTypes mtype
 
static bool gstat
 
static Specifier virt
 
static QCString debugStr
 
static QCString result
 
static Argumentparameter
 
static QCString argType
 
static QCString argName
 
static QCString initializer
 
static int initializerArrayScope
 
static int initializerScope
 
static QCString useModuleName
 
static Protection defaultProtection
 
static Protection typeProtection
 
static int typeMode = false
 
static InterfaceType ifType = IF_NONE
 
static bool functionLine = FALSE
 
static char stringStartSymbol
 
static bool parsingPrototype = FALSE
 
static SymbolModifiers currentModifiers
 Accumulated modifiers of current statement, eg variable declaration. More...
 
static QMap< Entry *, QMap< QCString, SymbolModifiers > > modifiers
 Holds program scope->symbol name->symbol modifiers. More...
 
static int yy_start_stack_ptr = 0
 
static int yy_start_stack_depth = 0
 
static int * yy_start_stack = NULL
 
 YY_DECL
 
register char * yy_cp
 
register char * yy_bp
 
register int yy_act
 

Macro Definition Documentation

#define ArrayInitializer   15

Definition at line 56728 of file fortranscanner.cpp.

#define AttributeList   12

Definition at line 56725 of file fortranscanner.cpp.

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 144 of file fortranscanner.cpp.

#define BlockData   29

Definition at line 56742 of file fortranscanner.cpp.

#define Comment   7

Definition at line 56720 of file fortranscanner.cpp.

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

Definition at line 56507 of file fortranscanner.cpp.

#define DocBackLine   27

Definition at line 56740 of file fortranscanner.cpp.

#define DocBlock   26

Definition at line 56739 of file fortranscanner.cpp.

#define ECHO   do { if (fwrite( fortranscannerYYtext, fortranscannerYYleng, 1, fortranscannerYYout )) {} } while (0)

Definition at line 56842 of file fortranscanner.cpp.

#define EndDoc   28

Definition at line 56741 of file fortranscanner.cpp.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 179 of file fortranscanner.cpp.

#define EOB_ACT_END_OF_FILE   1

Definition at line 180 of file fortranscanner.cpp.

#define EOB_ACT_LAST_MATCH   2

Definition at line 181 of file fortranscanner.cpp.

#define FLEX_BETA

Definition at line 33 of file fortranscanner.cpp.

#define FLEX_SCANNER

Definition at line 28 of file fortranscanner.cpp.

#define FLEXINT_H

Definition at line 49 of file fortranscanner.cpp.

#define fortranscannerYYwrap (   n)    1

Definition at line 354 of file fortranscanner.cpp.

#define INITIAL   0

fortran parsing states comment parsing states prototype parsing

Definition at line 56713 of file fortranscanner.cpp.

#define Initialization   14

Definition at line 56727 of file fortranscanner.cpp.

#define INT16_MAX   (32767)

Definition at line 92 of file fortranscanner.cpp.

#define INT16_MIN   (-32767-1)

Definition at line 83 of file fortranscanner.cpp.

#define INT32_MAX   (2147483647)

Definition at line 95 of file fortranscanner.cpp.

#define INT32_MIN   (-2147483647-1)

Definition at line 86 of file fortranscanner.cpp.

#define INT8_MAX   (127)

Definition at line 89 of file fortranscanner.cpp.

#define INT8_MIN   (-128)

Definition at line 80 of file fortranscanner.cpp.

#define InterfaceBody   19

Definition at line 56732 of file fortranscanner.cpp.

#define Module   8

Definition at line 56721 of file fortranscanner.cpp.

#define ModuleBody   10

Definition at line 56723 of file fortranscanner.cpp.

#define ModuleBodyContains   11

Definition at line 56724 of file fortranscanner.cpp.

#define ModuleProcedure   24

Definition at line 56737 of file fortranscanner.cpp.

#define Parameterlist   3

Definition at line 56716 of file fortranscanner.cpp.

#define Prepass   25

Definition at line 56738 of file fortranscanner.cpp.

#define Program   9

Definition at line 56722 of file fortranscanner.cpp.

#define Prototype   30

Definition at line 56743 of file fortranscanner.cpp.

#define PrototypeArgs   32

Definition at line 56745 of file fortranscanner.cpp.

#define PrototypeSubprog   31

Definition at line 56744 of file fortranscanner.cpp.

#define REJECT
Value:
{ \
*yy_cp = (yy_hold_char); /* undo effects of setting up fortranscannerYYtext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
++(yy_lp); \
goto find_rule; \
}
static char * yy_full_match
static int * yy_full_state
static char yy_hold_char
register char * yy_cp
static int yy_lp
static int yy_full_lp
static yy_state_type * yy_state_ptr

Definition at line 56425 of file fortranscanner.cpp.

#define Start   6

Definition at line 56719 of file fortranscanner.cpp.

#define StrIgnore   20

Definition at line 56733 of file fortranscanner.cpp.

#define String   21

Definition at line 56734 of file fortranscanner.cpp.

#define Subprog   1

Definition at line 56714 of file fortranscanner.cpp.

#define SubprogBody   4

Definition at line 56717 of file fortranscanner.cpp.

#define SubprogBodyContains   5

Definition at line 56718 of file fortranscanner.cpp.

#define SubprogPrefix   2

Definition at line 56715 of file fortranscanner.cpp.

#define Typedef   16

Definition at line 56729 of file fortranscanner.cpp.

#define TypedefBody   17

Definition at line 56730 of file fortranscanner.cpp.

#define TypedefBodyContains   18

Definition at line 56731 of file fortranscanner.cpp.

#define UINT16_MAX   (65535U)

Definition at line 101 of file fortranscanner.cpp.

#define UINT32_MAX   (4294967295U)

Definition at line 104 of file fortranscanner.cpp.

#define UINT8_MAX   (255U)

Definition at line 98 of file fortranscanner.cpp.

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

Definition at line 199 of file fortranscanner.cpp.

#define Use   22

Definition at line 56735 of file fortranscanner.cpp.

#define UseOnly   23

Definition at line 56736 of file fortranscanner.cpp.

#define Variable   13

Definition at line 56726 of file fortranscanner.cpp.

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 350 of file fortranscanner.cpp.

#define YY_BREAK   break;

Definition at line 56921 of file fortranscanner.cpp.

#define YY_BUF_SIZE   16384

Definition at line 163 of file fortranscanner.cpp.

#define YY_BUFFER_EOF_PENDING   2

Definition at line 266 of file fortranscanner.cpp.

#define YY_BUFFER_NEW   0

Definition at line 254 of file fortranscanner.cpp.

#define YY_BUFFER_NORMAL   1

Definition at line 255 of file fortranscanner.cpp.

#define yy_create_buffer   fortranscannerYY_create_buffer

Definition at line 9 of file fortranscanner.cpp.

#define YY_CURRENT_BUFFER
Value:
: NULL)
static size_t yy_buffer_stack_top
static YY_BUFFER_STATE * yy_buffer_stack

Definition at line 282 of file fortranscanner.cpp.

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 289 of file fortranscanner.cpp.

#define YY_DECL   int fortranscannerYYlex (void)

Definition at line 56909 of file fortranscanner.cpp.

#define YY_DECL_IS_OURS   1

Definition at line 56905 of file fortranscanner.cpp.

#define yy_delete_buffer   fortranscannerYY_delete_buffer

Definition at line 10 of file fortranscanner.cpp.

#define YY_DO_BEFORE_ACTION
Value:
*yy_cp = '\0'; \
register char * yy_bp
static char yy_hold_char
static char * yy_c_buf_p
register char * yy_cp
int fortranscannerYYleng
#define yytext_ptr

Definition at line 378 of file fortranscanner.cpp.

#define YY_END_OF_BUFFER   116

Definition at line 386 of file fortranscanner.cpp.

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 159 of file fortranscanner.cpp.

#define YY_EXIT_FAILURE   2

Definition at line 59235 of file fortranscanner.cpp.

#define YY_EXTRA_TYPE   void *

Definition at line 56756 of file fortranscanner.cpp.

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 56896 of file fortranscanner.cpp.

#define yy_flex_debug   fortranscannerYY_flex_debug

Definition at line 11 of file fortranscanner.cpp.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 29 of file fortranscanner.cpp.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 30 of file fortranscanner.cpp.

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 31 of file fortranscanner.cpp.

#define yy_flush_buffer   fortranscannerYY_flush_buffer

Definition at line 13 of file fortranscanner.cpp.

#define YY_FLUSH_BUFFER   fortranscannerYY_flush_buffer(YY_CURRENT_BUFFER )

Definition at line 318 of file fortranscanner.cpp.

#define yy_init_buffer   fortranscannerYY_init_buffer

Definition at line 12 of file fortranscanner.cpp.

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

Definition at line 56667 of file fortranscanner.cpp.

#define YY_INT_ALIGNED   short int

Definition at line 5 of file fortranscanner.cpp.

#define YY_LESS_LINENO (   n)

Definition at line 183 of file fortranscanner.cpp.

#define yy_load_buffer_state   fortranscannerYY_load_buffer_state

Definition at line 14 of file fortranscanner.cpp.

#define YY_MORE_ADJ   0

Definition at line 56437 of file fortranscanner.cpp.

#define yy_new_buffer   fortranscannerYY_create_buffer

Definition at line 328 of file fortranscanner.cpp.

#define YY_NEW_FILE   fortranscannerYYrestart(fortranscannerYYin )

Definition at line 157 of file fortranscanner.cpp.

#define YY_NO_INPUT   1

Definition at line 56509 of file fortranscanner.cpp.

#define YY_NO_UNISTD_H   1

Definition at line 56510 of file fortranscanner.cpp.

#define YY_NULL   0

Definition at line 131 of file fortranscanner.cpp.

#define YY_NUM_RULES   115

Definition at line 385 of file fortranscanner.cpp.

#define YY_READ_BUF_SIZE   8192

Definition at line 56834 of file fortranscanner.cpp.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 56438 of file fortranscanner.cpp.

#define YY_RULE_SETUP
Value:
#define YY_CURRENT_BUFFER_LVALUE
int fortranscannerYYleng
char * fortranscannerYYtext
#define YY_USER_ACTION

Definition at line 56924 of file fortranscanner.cpp.

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

Definition at line 138 of file fortranscanner.cpp.

#define yy_set_bol (   at_bol)
Value:
{ \
fortranscannerYYensure_buffer_stack (); \
fortranscannerYY_create_buffer(fortranscannerYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_CURRENT_BUFFER_LVALUE
FILE * fortranscannerYYin
#define YY_CURRENT_BUFFER
#define YY_BUF_SIZE
if(!(yy_init))

Definition at line 340 of file fortranscanner.cpp.

#define yy_set_interactive (   is_interactive)
Value:
{ \
fortranscannerYYensure_buffer_stack (); \
fortranscannerYY_create_buffer(fortranscannerYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define YY_CURRENT_BUFFER_LVALUE
FILE * fortranscannerYYin
#define YY_CURRENT_BUFFER
#define YY_BUF_SIZE
if(!(yy_init))

Definition at line 330 of file fortranscanner.cpp.

#define YY_SKIP_YYWRAP

Definition at line 355 of file fortranscanner.cpp.

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

Definition at line 150 of file fortranscanner.cpp.

#define YY_START_STACK_INCR   25

Definition at line 56891 of file fortranscanner.cpp.

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

Definition at line 168 of file fortranscanner.cpp.

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

Definition at line 154 of file fortranscanner.cpp.

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 207 of file fortranscanner.cpp.

#define yy_switch_to_buffer   fortranscannerYY_switch_to_buffer

Definition at line 15 of file fortranscanner.cpp.

#define YY_TRAILING_HEAD_MASK   0x4000

Definition at line 56424 of file fortranscanner.cpp.

#define YY_TRAILING_MASK   0x2000

Definition at line 56423 of file fortranscanner.cpp.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 171 of file fortranscanner.cpp.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 202 of file fortranscanner.cpp.

#define YY_USER_ACTION   yyColNr+=(int)fortranscannerYYleng;

Definition at line 56668 of file fortranscanner.cpp.

Definition at line 24 of file fortranscanner.cpp.

#define yyconst

Definition at line 127 of file fortranscanner.cpp.

#define yyfree   fortranscannerYYfree

Definition at line 26 of file fortranscanner.cpp.

#define yyin   fortranscannerYYin

Definition at line 16 of file fortranscanner.cpp.

#define yyleng   fortranscannerYYleng

Definition at line 17 of file fortranscanner.cpp.

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up fortranscannerYYtext. */ \
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 fortranscannerYYtext again */ \
} \
while ( 0 )
register char * yy_bp
static char yy_hold_char
#define YY_DO_BEFORE_ACTION
static char * yy_c_buf_p
register char * yy_cp
std::void_t< T > n
#define YY_RESTORE_YY_MORE_OFFSET
#define YY_MORE_ADJ
while(1)

Definition at line 59247 of file fortranscanner.cpp.

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up fortranscannerYYtext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
(yy_c_buf_p) = fortranscannerYYtext + yyless_macro_arg; \
*(yy_c_buf_p) = '\0'; \
fortranscannerYYleng = yyless_macro_arg; \
} \
while ( 0 )
static char yy_hold_char
static char * yy_c_buf_p
std::void_t< T > n
int fortranscannerYYleng
char * fortranscannerYYtext
while(1)

Definition at line 59247 of file fortranscanner.cpp.

#define yylex   fortranscannerYYlex

Definition at line 18 of file fortranscanner.cpp.

#define yylineno   fortranscannerYYlineno

Definition at line 19 of file fortranscanner.cpp.

#define yymore ( )    yymore_used_but_not_detected

Definition at line 56436 of file fortranscanner.cpp.

#define yyout   fortranscannerYYout

Definition at line 20 of file fortranscanner.cpp.

#define yyrealloc   fortranscannerYYrealloc

Definition at line 25 of file fortranscanner.cpp.

#define yyrestart   fortranscannerYYrestart

Definition at line 21 of file fortranscanner.cpp.

#define YYSTATE   YY_START

Definition at line 151 of file fortranscanner.cpp.

#define YYTABLES_NAME   "yytables"

Definition at line 59453 of file fortranscanner.cpp.

#define yyterminate ( )    return YY_NULL

Definition at line 56886 of file fortranscanner.cpp.

#define yytext   fortranscannerYYtext

Definition at line 22 of file fortranscanner.cpp.

#define yytext_ptr   fortranscannerYYtext

Definition at line 368 of file fortranscanner.cpp.

#define yywrap   fortranscannerYYwrap

Definition at line 23 of file fortranscanner.cpp.

Typedef Documentation

typedef short int flex_int16_t

Definition at line 71 of file fortranscanner.cpp.

typedef int flex_int32_t

Definition at line 72 of file fortranscanner.cpp.

typedef signed char flex_int8_t

Definition at line 70 of file fortranscanner.cpp.

typedef unsigned short int flex_uint16_t

Definition at line 74 of file fortranscanner.cpp.

typedef unsigned int flex_uint32_t

Definition at line 75 of file fortranscanner.cpp.

typedef unsigned char flex_uint8_t

Definition at line 73 of file fortranscanner.cpp.

Definition at line 172 of file fortranscanner.cpp.

typedef unsigned char YY_CHAR

Definition at line 357 of file fortranscanner.cpp.

typedef size_t yy_size_t

Definition at line 203 of file fortranscanner.cpp.

typedef int yy_state_type

Definition at line 361 of file fortranscanner.cpp.

Enumeration Type Documentation

Enumerator
IF_NONE 
IF_SPECIFIC 
IF_GENERIC 
IF_ABSTRACT 

Definition at line 56513 of file fortranscanner.cpp.

enum ScanVar
Enumerator
V_IGNORE 
V_VARIABLE 
V_PARAMETER 
V_RESULT 

Definition at line 56512 of file fortranscanner.cpp.

Function Documentation

static void addCurrentEntry ( int  case_insens)
static

adds current entry to current_root and creates new current

Definition at line 60356 of file fortranscanner.cpp.

60357 {
60358  if (case_insens) current->name = current->name.lower();
60359  //printf("===Adding entry %s to %s\n", current->name.data(), current_root->name.data());
60361  last_entry = current;
60362  current = new Entry ;
60363  initEntry();
60364 }
Definition: entry.h:63
static Entry * current
void addSubEntry(Entry *e)
Definition: entry.cpp:206
QCString name
member name
Definition: entry.h:237
static Entry * current_root
static Entry * last_entry
static void initEntry()
QCString lower() const
Definition: qcstring.cpp:263
static void addInterface ( QCString  name,
InterfaceType  type 
)
static

Adds interface to the root entry.

Note
Code was brought to this procedure from the parser, because there was/is idea to use it in several parts of the parser.

Definition at line 60420 of file fortranscanner.cpp.

60421 {
60422  if (YY_START == Start)
60423  {
60424  addModule(NULL);
60425  yy_push_state(ModuleBody); //anon program
60426  }
60427 
60428  current->section = Entry::CLASS_SEC; // was Entry::INTERFACE_SEC;
60430  current->name = name;
60431 
60432  switch (type)
60433  {
60434  case IF_ABSTRACT:
60435  current->type = "abstract";
60436  break;
60437 
60438  case IF_GENERIC:
60439  current->type = "generic";
60440  break;
60441 
60442  case IF_SPECIFIC:
60443  case IF_NONE:
60444  default:
60445  current->type = "";
60446  }
60447 
60448  /* if type is part of a module, mod name is necessary for output */
60449  if ((current_root) &&
60452  {
60453  current->name= current_root->name + "::" + current->name;
60454  }
60455 
60459  addCurrentEntry(1);
60460 }
static QCString name
Definition: declinfo.cpp:673
uint64 spec
class/member specifiers
Definition: entry.h:243
static int yyLineNr
static void addCurrentEntry(int case_insens)
static Entry * current
QCString name
member name
Definition: entry.h:237
static void addModule(const char *name, bool isModule=FALSE)
static Entry * current_root
static const uint64 Interface
Definition: entry.h:125
int startLine
start line of entry in the source
Definition: entry.h:283
static void yy_push_state(int new_state)
#define YY_START
#define ModuleBody
QCString fileName
file this entry was extracted from
Definition: entry.h:282
static QCString yyFileName
#define Start
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 addModule ( const char *  name,
bool  isModule = FALSE 
)
static

Definition at line 60368 of file fortranscanner.cpp.

60369 {
60370  DBG_CTX((stderr, "0=========> got module %s\n", name));
60371 
60372  if (isModule)
60374  else
60376 
60377  if (name!=NULL)
60378  {
60379  current->name = name;
60380  }
60381  else
60382  {
60384  int index = max(fname.findRev('/'), fname.findRev('\\'));
60385  fname = fname.right(fname.length()-index-1);
60386  fname = fname.prepend("__").append("__");
60387  current->name = fname;
60388  }
60389  current->type = "program";
60391  current->bodyLine = yyLineNr; // used for source reference
60394  addCurrentEntry(1);
60396 }
static QCString name
Definition: declinfo.cpp:673
static int yyLineNr
static void addCurrentEntry(int case_insens)
Definition: types.h:26
static Entry * current
#define DBG_CTX(x)
QCString name
member name
Definition: entry.h:237
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
static Entry * last_entry
QCString right(uint len) const
Definition: qcstring.cpp:231
int startLine
start line of entry in the source
Definition: entry.h:283
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
Protection protection
class protection
Definition: entry.h:241
static int max(int a, int b)
static void startScope(Entry *scope)
QCString fileName
file this entry was extracted from
Definition: entry.h:282
static QCString yyFileName
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 addSubprogram ( const char *  text)
static

Definition at line 60399 of file fortranscanner.cpp.

60400 {
60401  DBG_CTX((stderr,"1=========> got subprog, type: %s\n",text));
60404  QCString subtype = text; subtype=subtype.lower().stripWhiteSpace();
60405  functionLine = (subtype.find("function") != -1);
60406  current->type += " " + subtype;
60409  current->bodyLine = yyLineNr; // used for source reference start of body of routine
60410  current->startLine = yyLineNr; // used for source reference start of definition
60411  current->args.resize(0);
60412  current->argList->clear();
60413  docBlock.resize(0);
60414 }
bool resize(uint newlen)
Definition: qcstring.h:225
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
static int yyLineNr
static Entry * current
ArgumentList * argList
member arguments as a list
Definition: entry.h:254
#define DBG_CTX(x)
static bool functionLine
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static QCString docBlock
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 QList< Entry > subrCurrent
QCString fileName
file this entry was extracted from
Definition: entry.h:282
static QCString yyFileName
void prepend(const type *d)
Definition: qlist.h:72
QCString lower() const
Definition: qcstring.cpp:263
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 QCString applyModifiers ( QCString  typeName,
SymbolModifiers mdfs 
)
static

Find function with given name in entry.

Apply modifiers stored in mdfs to the typeName string.

Definition at line 60063 of file fortranscanner.cpp.

60064 {
60065  if (!mdfs.dimension.isNull())
60066  {
60067  if (!typeName.isEmpty()) typeName += ", ";
60068  typeName += mdfs.dimension;
60069  }
60071  {
60072  if (!typeName.isEmpty()) typeName += ", ";
60073  typeName += directionStrs[mdfs.direction];
60074  }
60075  if (mdfs.optional)
60076  {
60077  if (!typeName.isEmpty()) typeName += ", ";
60078  typeName += "optional";
60079  }
60080  if (mdfs.allocatable)
60081  {
60082  if (!typeName.isEmpty()) typeName += ", ";
60083  typeName += "allocatable";
60084  }
60085  if (mdfs.external)
60086  {
60087  if (!typeName.contains("external"))
60088  {
60089  if (!typeName.isEmpty()) typeName += ", ";
60090  typeName += "external";
60091  }
60092  }
60093  if (mdfs.intrinsic)
60094  {
60095  if (!typeName.isEmpty()) typeName += ", ";
60096  typeName += "intrinsic";
60097  }
60098  if (mdfs.parameter)
60099  {
60100  if (!typeName.isEmpty()) typeName += ", ";
60101  typeName += "parameter";
60102  }
60103  if (mdfs.pointer)
60104  {
60105  if (!typeName.isEmpty()) typeName += ", ";
60106  typeName += "pointer";
60107  }
60108  if (mdfs.target)
60109  {
60110  if (!typeName.isEmpty()) typeName += ", ";
60111  typeName += "target";
60112  }
60113  if (mdfs.save)
60114  {
60115  if (!typeName.isEmpty()) typeName += ", ";
60116  typeName += "save";
60117  }
60118  if (mdfs.deferred)
60119  {
60120  if (!typeName.isEmpty()) typeName += ", ";
60121  typeName += "deferred";
60122  }
60123  if (mdfs.nonoverridable)
60124  {
60125  if (!typeName.isEmpty()) typeName += ", ";
60126  typeName += "non_overridable";
60127  }
60128  if (mdfs.nopass)
60129  {
60130  if (!typeName.isEmpty()) typeName += ", ";
60131  typeName += "nopass";
60132  }
60133  if (mdfs.pass)
60134  {
60135  if (!typeName.isEmpty()) typeName += ", ";
60136  typeName += "pass";
60137  if (!mdfs.passVar.isEmpty())
60138  typeName += "(" + mdfs.passVar + ")";
60139  }
60140  if (mdfs.protection == SymbolModifiers::PUBLIC)
60141  {
60142  if (!typeName.isEmpty()) typeName += ", ";
60143  typeName += "public";
60144  }
60145  else if (mdfs.protection == SymbolModifiers::PRIVATE)
60146  {
60147  if (!typeName.isEmpty()) typeName += ", ";
60148  typeName += "private";
60149  }
60150  if (mdfs.protect)
60151  {
60152  if (!typeName.isEmpty()) typeName += ", ";
60153  typeName += "protected";
60154  }
60155  if (mdfs.contiguous)
60156  {
60157  if (!typeName.isEmpty()) typeName += ", ";
60158  typeName += "contiguous";
60159  }
60160  if (mdfs.volat)
60161  {
60162  if (!typeName.isEmpty()) typeName += ", ";
60163  typeName += "volatile";
60164  }
60165  if (mdfs.value)
60166  {
60167  if (!typeName.isEmpty()) typeName += ", ";
60168  typeName += "value";
60169  }
60170 
60171  return typeName;
60172 }
bool isEmpty() const
Definition: qcstring.h:189
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:153
bool isNull() const
Definition: qcstring.h:183
static const char * directionStrs[]
static void applyModifiers ( Argument arg,
SymbolModifiers mdfs 
)
static

Apply modifiers stored in mdfs to the arg argument.

Definition at line 60175 of file fortranscanner.cpp.

60176 {
60177  QCString tmp = arg->type;
60178  arg->type = applyModifiers(tmp, mdfs);
60179 }
QCString type
Definition: arguments.h:67
string tmp
Definition: languages.py:63
static QCString applyModifiers(QCString typeName, SymbolModifiers &mdfs)
static void applyModifiers ( Entry ent,
SymbolModifiers mdfs 
)
static

Apply modifiers stored in mdfs to the ent entry.

Definition at line 60182 of file fortranscanner.cpp.

60183 {
60184  QCString tmp = ent->type;
60185  ent->type = applyModifiers(tmp, mdfs);
60186 
60187  if (mdfs.protection == SymbolModifiers::PUBLIC)
60188  ent->protection = Public;
60189  else if (mdfs.protection == SymbolModifiers::PRIVATE)
60190  ent->protection = Private;
60191 }
Definition: types.h:26
Definition: types.h:26
string tmp
Definition: languages.py:63
Protection protection
class protection
Definition: entry.h:241
static QCString applyModifiers(QCString typeName, SymbolModifiers &mdfs)
QCString type
member type
Definition: entry.h:236
static void copyEntry ( Entry dest,
Entry src 
)
static

used to copy entry to an interface module procedure

Definition at line 59821 of file fortranscanner.cpp.

59822 {
59823  dest->type = src->type;
59824  dest->fileName = src->fileName;
59825  dest->startLine = src->startLine;
59826  dest->bodyLine = src->bodyLine;
59827  dest->endBodyLine = src->endBodyLine;
59828  dest->args = src->args;
59829  dest->argList = new ArgumentList(*src->argList);
59830  dest->doc = src->doc;
59831  dest->brief = src->brief;
59832 }
This class represents an function or template argument list.
Definition: arguments.h:82
ArgumentList * argList
member arguments as a list
Definition: entry.h:254
QCString brief
brief description (doc block)
Definition: entry.h:263
int endBodyLine
line number where the definition ends
Definition: entry.h:277
int startLine
start line of entry in the source
Definition: entry.h:283
QCString args
member argument string
Definition: entry.h:252
QCString doc
documentation block (partly parsed)
Definition: entry.h:260
QCString fileName
file this entry was extracted from
Definition: entry.h:282
QCString type
member type
Definition: entry.h:236
int bodyLine
line number of the definition in the source
Definition: entry.h:276
static bool endScope ( Entry scope,
bool  isGlobalRoot 
)
static

Ends scope in fortran program: may update subprogram arguments or module variable attributes.

See also
startScope()

Definition at line 60209 of file fortranscanner.cpp.

60210 {
60211  //cout<<"end scope: "<<scope->name<<endl;
60212  if (current_root->parent() || isGlobalRoot)
60213  {
60214  current_root= current_root->parent(); /* end substructure */
60215  }
60216  else
60217  {
60218  fprintf(stderr,"parse error in end <scopename>");
60219  scanner_abort();
60220  return FALSE;
60221  }
60222 
60223  // update variables or subprogram arguments with modifiers
60225 
60226  if (scope->section == Entry::FUNCTION_SEC)
60227  {
60228  // iterate all symbol modifiers of the scope
60229  for (QMap<QCString,SymbolModifiers>::Iterator it=mdfsMap.begin(); it!=mdfsMap.end(); it++)
60230  {
60231  //cout<<it.key()<<": "<<it.data()<<endl;
60232  Argument *arg = findArgument(scope, it.key());
60233 
60234  if (arg)
60235  applyModifiers(arg, it.data());
60236  }
60237 
60238  // find return type for function
60239  //cout<<"RETURN NAME "<<modifiers[current_root][scope->name.lower()].returnName<<endl;
60240  QCString returnName = modifiers[current_root][scope->name.lower()].returnName.lower();
60241  if (modifiers[scope].contains(returnName))
60242  {
60243  scope->type = modifiers[scope][returnName].type; // returning type works
60244  applyModifiers(scope, modifiers[scope][returnName]); // returning array works
60245  }
60246 
60247  }
60248  if (scope->section == Entry::CLASS_SEC)
60249  { // was INTERFACE_SEC
60250  if (scope->parent()->section == Entry::FUNCTION_SEC)
60251  { // interface within function
60252  // iterate functions of interface and
60253  // try to find types for dummy(ie. argument) procedures.
60254  //cout<<"Search in "<<scope->name<<endl;
60255  EntryListIterator eli(*scope->children());
60256  Entry *ce;
60257  int count = 0;
60258  int found = FALSE;
60259  for (;(ce=eli.current());++eli)
60260  {
60261  count++;
60262  if (ce->section != Entry::FUNCTION_SEC)
60263  continue;
60264 
60265  Argument *arg = findArgument(scope->parent(), ce->name, TRUE);
60266  if (arg != 0)
60267  {
60268  // set type of dummy procedure argument to interface
60269  arg->name = arg->type;
60270  arg->type = scope->name;
60271  }
60272  if (ce->name.lower() == scope->name.lower()) found = TRUE;
60273  }
60274  if ((count == 1) && found)
60275  {
60276  // clear all modifiers of the scope
60277  modifiers.remove(scope);
60278  delete scope->parent()->removeSubEntry(scope);
60279  scope = 0;
60280  return TRUE;
60281  }
60282  }
60283  }
60284  if (scope->section!=Entry::FUNCTION_SEC)
60285  { // not function section
60286  // iterate variables: get and apply modifiers
60287  EntryListIterator eli(*scope->children());
60288  Entry *ce;
60289  for (;(ce=eli.current());++eli)
60290  {
60291  if (ce->section != Entry::VARIABLE_SEC && ce->section != Entry::FUNCTION_SEC)
60292  continue;
60293 
60294  //cout<<ce->name<<", "<<mdfsMap.contains(ce->name.lower())<<mdfsMap.count()<<endl;
60295  if (mdfsMap.contains(ce->name.lower()))
60296  applyModifiers(ce, mdfsMap[ce->name.lower()]);
60297  }
60298  }
60299 
60300  // clear all modifiers of the scope
60301  modifiers.remove(scope);
60302 
60303  return TRUE;
60304 }
QCString type
Definition: arguments.h:67
static QMap< Entry *, QMap< QCString, SymbolModifiers > > modifiers
Holds program scope->symbol name->symbol modifiers.
static QCString scope
Definition: declinfo.cpp:668
Iterator end()
Definition: qmap.h:523
Definition: entry.h:63
Iterator begin()
Definition: qmap.h:522
const bool FALSE
Definition: qglobal.h:370
QCString name
member name
Definition: entry.h:237
Entry * parent() const
Definition: entry.h:205
static Argument * findArgument(Entry *subprog, QCString name, bool byTypeName=FALSE)
static Entry * current_root
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
bool contains(const Key &k) const
Definition: qmap.h:537
const QList< Entry > * children() const
Definition: entry.h:210
static void scanner_abort()
QCString name
Definition: arguments.h:69
QCString lower() const
Definition: qcstring.cpp:263
static QCString applyModifiers(QCString typeName, SymbolModifiers &mdfs)
Entry * removeSubEntry(Entry *e)
Definition: entry.cpp:322
const bool TRUE
Definition: qglobal.h:371
Definition: qmap.h:501
QCString type
member type
Definition: entry.h:236
int section
entry type (see Sections);
Definition: entry.h:235
static QCString extractFromParens ( const QCString  name)
static

Extracts string which resides within parentheses of provided string.

Definition at line 59869 of file fortranscanner.cpp.

59870 {
59871  QCString extracted = name;
59872  int start = extracted.find("(");
59873  if (start != -1)
59874  {
59875  extracted.remove(0, start+1);
59876  }
59877  int end = extracted.findRev(")");
59878  if (end != -1)
59879  {
59880  int length = extracted.length();
59881  extracted.remove(end, length);
59882  }
59883  extracted = extracted.stripWhiteSpace();
59884 
59885  return extracted;
59886 }
static QCString name
Definition: declinfo.cpp:673
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
uint length() const
Definition: qcstring.h:195
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
static Argument* findArgument ( Entry subprog,
QCString  name,
bool  byTypeName = FALSE 
)
static

For debugging purposes.

Find argument with given name in subprog entry.

Definition at line 60025 of file fortranscanner.cpp.

60026 {
60027  QCString cname(name.lower());
60028  for (unsigned int i=0; i<subprog->argList->count(); i++)
60029  {
60030  Argument *arg = subprog->argList->at(i);
60031  if ((!byTypeName && arg->name.lower() == cname) ||
60032  (byTypeName && arg->type.lower() == cname)
60033  )
60034  {
60035  return arg;
60036  }
60037  }
60038  return 0;
60039 }
QCString type
Definition: arguments.h:67
ArgumentList * argList
member arguments as a list
Definition: entry.h:254
type * at(uint i) const
Definition: qlist.h:94
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
uint count() const
Definition: qlist.h:66
QCString name
Definition: arguments.h:69
QCString lower() const
Definition: qcstring.cpp:263
YY_BUFFER_STATE fortranscannerYY_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 58915 of file fortranscanner.cpp.

58916 {
58918 
58919  b = (YY_BUFFER_STATE) fortranscannerYYalloc(sizeof( struct yy_buffer_state ) );
58920  if ( ! b )
58921  YY_FATAL_ERROR( "out of dynamic memory in fortranscannerYY_create_buffer()" );
58922 
58923  b->yy_buf_size = size;
58924 
58925  /* yy_ch_buf has to be 2 characters longer than the size given because
58926  * we need to put in 2 end-of-buffer characters.
58927  */
58928  b->yy_ch_buf = (char *) fortranscannerYYalloc(b->yy_buf_size + 2 );
58929  if ( ! b->yy_ch_buf )
58930  YY_FATAL_ERROR( "out of dynamic memory in fortranscannerYY_create_buffer()" );
58931 
58932  b->yy_is_our_buffer = 1;
58933 
58935 
58936  return b;
58937 }
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
struct yy_buffer_state * YY_BUFFER_STATE
char * yy_ch_buf
Definition: code.cpp:212
static void fortranscannerYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
int yy_is_our_buffer
Definition: code.cpp:229
static bool * b
Definition: config.cpp:1043
void * fortranscannerYYalloc(yy_size_t)
#define YY_FATAL_ERROR(msg)
void fortranscannerYY_delete_buffer ( YY_BUFFER_STATE  b)

Destroy the buffer.

Parameters
ba buffer created with fortranscannerYY_create_buffer()

Definition at line 58943 of file fortranscanner.cpp.

58944 {
58945 
58946  if ( ! b )
58947  return;
58948 
58949  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
58951 
58952  if ( b->yy_is_our_buffer )
58953  fortranscannerYYfree((void *) b->yy_ch_buf );
58954 
58955  fortranscannerYYfree((void *) b );
58956 }
#define YY_CURRENT_BUFFER_LVALUE
#define YY_CURRENT_BUFFER
struct yy_buffer_state * YY_BUFFER_STATE
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
void fortranscannerYYfree(void *)
void fortranscannerYY_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 58990 of file fortranscanner.cpp.

58991 {
58992  if ( ! b )
58993  return;
58994 
58995  b->yy_n_chars = 0;
58996 
58997  /* We always need two end-of-buffer characters. The first causes
58998  * a transition to the end-of-buffer state. The second causes
58999  * a jam in that state.
59000  */
59003 
59004  b->yy_buf_pos = &b->yy_ch_buf[0];
59005 
59006  b->yy_at_bol = 1;
59008 
59009  if ( b == YY_CURRENT_BUFFER )
59011 }
#define YY_END_OF_BUFFER_CHAR
char * yy_buf_pos
Definition: code.cpp:213
int yy_n_chars
Definition: code.cpp:223
#define YY_BUFFER_NEW
#define YY_CURRENT_BUFFER
static void fortranscannerYY_load_buffer_state(void)
char * yy_ch_buf
Definition: code.cpp:212
int yy_buffer_status
Definition: code.cpp:252
static void fortranscannerYY_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)
static

Definition at line 58962 of file fortranscanner.cpp.

58964 {
58965  int oerrno = errno;
58966 
58968 
58969  b->yy_input_file = file;
58970  b->yy_fill_buffer = 1;
58971 
58972  /* If b is the current buffer, then fortranscannerYY_init_buffer was _probably_
58973  * called from fortranscannerYYrestart() or through yy_get_next_buffer.
58974  * In that case, we don't want to reset the lineno or column.
58975  */
58976  if (b != YY_CURRENT_BUFFER){
58977  b->yy_bs_lineno = 1;
58978  b->yy_bs_column = 0;
58979  }
58980 
58981  b->yy_is_interactive = 0;
58982 
58983  errno = oerrno;
58984 }
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
#define YY_CURRENT_BUFFER
int yy_bs_column
Definition: code.cpp:245
void fortranscannerYY_flush_buffer(YY_BUFFER_STATE b)
int yy_is_interactive
Definition: code.cpp:236
static void fortranscannerYY_load_buffer_state ( void  )
static

Definition at line 58901 of file fortranscanner.cpp.

58902 {
58903  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
58904  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
58906  (yy_hold_char) = *(yy_c_buf_p);
58907 }
#define YY_CURRENT_BUFFER_LVALUE
FILE * fortranscannerYYin
static char yy_hold_char
static char * yy_c_buf_p
static int yy_n_chars
#define yytext_ptr
YY_BUFFER_STATE fortranscannerYY_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 59117 of file fortranscanner.cpp.

59118 {
59120 
59121  if ( size < 2 ||
59124  /* They forgot to leave room for the EOB's. */
59125  return 0;
59126 
59127  b = (YY_BUFFER_STATE) fortranscannerYYalloc(sizeof( struct yy_buffer_state ) );
59128  if ( ! b )
59129  YY_FATAL_ERROR( "out of dynamic memory in fortranscannerYY_scan_buffer()" );
59130 
59131  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
59132  b->yy_buf_pos = b->yy_ch_buf = base;
59133  b->yy_is_our_buffer = 0;
59134  b->yy_input_file = 0;
59135  b->yy_n_chars = b->yy_buf_size;
59136  b->yy_is_interactive = 0;
59137  b->yy_at_bol = 1;
59138  b->yy_fill_buffer = 0;
59140 
59142 
59143  return b;
59144 }
#define YY_END_OF_BUFFER_CHAR
char * yy_buf_pos
Definition: code.cpp:213
FILE * yy_input_file
Definition: code.cpp:210
int yy_n_chars
Definition: code.cpp:223
int yy_fill_buffer
Definition: code.cpp:250
#define YY_BUFFER_NEW
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
struct yy_buffer_state * YY_BUFFER_STATE
void fortranscannerYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
static bool * b
Definition: config.cpp:1043
int yy_is_interactive
Definition: code.cpp:236
void * fortranscannerYYalloc(yy_size_t)
#define YY_FATAL_ERROR(msg)
int yy_buffer_status
Definition: code.cpp:252
YY_BUFFER_STATE fortranscannerYY_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len 
)

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

59168 {
59170  char *buf;
59171  yy_size_t n;
59172  int i;
59173 
59174  /* Get memory for full buffer, including space for trailing EOB's. */
59175  n = _yybytes_len + 2;
59176  buf = (char *) fortranscannerYYalloc(n );
59177  if ( ! buf )
59178  YY_FATAL_ERROR( "out of dynamic memory in fortranscannerYY_scan_bytes()" );
59179 
59180  for ( i = 0; i < _yybytes_len; ++i )
59181  buf[i] = yybytes[i];
59182 
59183  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
59184 
59185  b = fortranscannerYY_scan_buffer(buf,n );
59186  if ( ! b )
59187  YY_FATAL_ERROR( "bad buffer in fortranscannerYY_scan_bytes()" );
59188 
59189  /* It's okay to grow etc. this buffer, and we should throw it
59190  * away when we're done.
59191  */
59192  b->yy_is_our_buffer = 1;
59193 
59194  return b;
59195 }
#define YY_END_OF_BUFFER_CHAR
std::void_t< T > n
int yy_is_our_buffer
Definition: code.cpp:229
static bool * b
Definition: config.cpp:1043
YY_BUFFER_STATE fortranscannerYY_scan_buffer(char *base, yy_size_t size)
void * fortranscannerYYalloc(yy_size_t)
#define YY_FATAL_ERROR(msg)
size_t yy_size_t
Definition: code.cpp:203
YY_BUFFER_STATE fortranscannerYY_scan_string ( yyconst char *  yystr)

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

Definition at line 59154 of file fortranscanner.cpp.

59155 {
59156 
59157  return fortranscannerYY_scan_bytes(yystr,strlen(yystr) );
59158 }
YY_BUFFER_STATE fortranscannerYY_scan_bytes(yyconst char *bytes, int len)
void fortranscannerYY_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Definition at line 58870 of file fortranscanner.cpp.

58871 {
58872 
58873  /* TODO. We should be able to replace this entire function body
58874  * with
58875  * fortranscannerYYpop_buffer_state();
58876  * fortranscannerYYpush_buffer_state(new_buffer);
58877  */
58879  if ( YY_CURRENT_BUFFER == new_buffer )
58880  return;
58881 
58882  if ( YY_CURRENT_BUFFER )
58883  {
58884  /* Flush out information for old buffer. */
58885  *(yy_c_buf_p) = (yy_hold_char);
58886  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
58887  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
58888  }
58889 
58890  YY_CURRENT_BUFFER_LVALUE = new_buffer;
58892 
58893  /* We don't actually know whether we did this switch during
58894  * EOF (fortranscannerYYwrap()) processing, but the only time this flag
58895  * is looked at is after fortranscannerYYwrap() is called, so it's safe
58896  * to go ahead and always set it.
58897  */
58899 }
#define YY_CURRENT_BUFFER_LVALUE
static int yy_did_buffer_switch_on_eof
static void fortranscannerYYensure_buffer_stack(void)
static char yy_hold_char
#define YY_CURRENT_BUFFER
static void fortranscannerYY_load_buffer_state(void)
static char * yy_c_buf_p
static int yy_n_chars
void * fortranscannerYYalloc ( yy_size_t  size)

Definition at line 59431 of file fortranscanner.cpp.

59432 {
59433  return (void *) malloc( size );
59434 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
static void fortranscannerYYensure_buffer_stack ( void  )
static

Definition at line 59068 of file fortranscanner.cpp.

59069 {
59070  int num_to_alloc;
59071 
59072  if (!(yy_buffer_stack)) {
59073 
59074  /* First allocation is just for 2 elements, since we don't know if this
59075  * scanner will even need a stack. We use 2 instead of 1 to avoid an
59076  * immediate realloc on the next call.
59077  */
59078  num_to_alloc = 1;
59080  (num_to_alloc * sizeof(struct yy_buffer_state*)
59081  );
59082  if ( ! (yy_buffer_stack) )
59083  YY_FATAL_ERROR( "out of dynamic memory in fortranscannerYYensure_buffer_stack()" );
59084 
59085  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
59086 
59087  (yy_buffer_stack_max) = num_to_alloc;
59088  (yy_buffer_stack_top) = 0;
59089  return;
59090  }
59091 
59092  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
59093 
59094  /* Increase the buffer to prepare for a possible push. */
59095  int grow_size = 8 /* arbitrary grow size */;
59096 
59097  num_to_alloc = (yy_buffer_stack_max) + grow_size;
59099  ((yy_buffer_stack),
59100  num_to_alloc * sizeof(struct yy_buffer_state*)
59101  );
59102  if ( ! (yy_buffer_stack) )
59103  YY_FATAL_ERROR( "out of dynamic memory in fortranscannerYYensure_buffer_stack()" );
59104 
59105  /* zero only the new slots.*/
59106  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
59107  (yy_buffer_stack_max) = num_to_alloc;
59108  }
59109 }
void * fortranscannerYYrealloc(void *, yy_size_t)
static size_t yy_buffer_stack_top
static size_t yy_buffer_stack_max
static YY_BUFFER_STATE * yy_buffer_stack
void * fortranscannerYYalloc(yy_size_t)
#define YY_FATAL_ERROR(msg)
void fortranscannerYYfree ( void *  ptr)

Definition at line 59448 of file fortranscanner.cpp.

59449 {
59450  free( (char *) ptr ); /* see fortranscannerYYrealloc() for (char *) cast */
59451 }
int fortranscannerYYget_debug ( void  )

Definition at line 59331 of file fortranscanner.cpp.

59332 {
59334 }
int fortranscannerYY_flex_debug
YY_EXTRA_TYPE fortranscannerYYget_extra ( void  )
FILE * fortranscannerYYget_in ( void  )

Get the input stream.

Definition at line 59275 of file fortranscanner.cpp.

59276 {
59277  return fortranscannerYYin;
59278 }
FILE * fortranscannerYYin
int fortranscannerYYget_leng ( void  )

Get the length of the current token.

Definition at line 59291 of file fortranscanner.cpp.

59292 {
59293  return fortranscannerYYleng;
59294 }
int fortranscannerYYleng
int fortranscannerYYget_lineno ( void  )

Get the current line number.

Definition at line 59266 of file fortranscanner.cpp.

59267 {
59268 
59269  return fortranscannerYYlineno;
59270 }
int fortranscannerYYlineno
FILE * fortranscannerYYget_out ( void  )

Get the output stream.

Definition at line 59283 of file fortranscanner.cpp.

59284 {
59285  return fortranscannerYYout;
59286 }
FILE * fortranscannerYYout
char * fortranscannerYYget_text ( void  )

Get the current token.

Definition at line 59300 of file fortranscanner.cpp.

59301 {
59302  return fortranscannerYYtext;
59303 }
char * fortranscannerYYtext
int fortranscannerYYlex ( void  )
int fortranscannerYYlex_destroy ( void  )

Definition at line 59379 of file fortranscanner.cpp.

59380 {
59381 
59382  /* Pop the buffer stack, destroying each element. */
59383  while(YY_CURRENT_BUFFER){
59385  YY_CURRENT_BUFFER_LVALUE = NULL;
59387  }
59388 
59389  /* Destroy the stack itself. */
59391  (yy_buffer_stack) = NULL;
59392 
59393  /* Destroy the start condition stack. */
59395  (yy_start_stack) = NULL;
59396 
59398  (yy_state_buf) = NULL;
59399 
59400  /* Reset the globals. This is important in a non-reentrant scanner so the next time
59401  * fortranscannerYYlex() is called, initialization will occur. */
59402  yy_init_globals( );
59403 
59404  return 0;
59405 }
static int * yy_start_stack
#define YY_CURRENT_BUFFER_LVALUE
void fortranscannerYYpop_buffer_state(void)
void fortranscannerYY_delete_buffer(YY_BUFFER_STATE b)
static yy_state_type * yy_state_buf
#define YY_CURRENT_BUFFER
static int yy_init_globals(void)
void fortranscannerYYfree(void *)
static YY_BUFFER_STATE * yy_buffer_stack
void fortranscannerYYpop_buffer_state ( void  )

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

Definition at line 59049 of file fortranscanner.cpp.

59050 {
59051  if (!YY_CURRENT_BUFFER)
59052  return;
59053 
59055  YY_CURRENT_BUFFER_LVALUE = NULL;
59056  if ((yy_buffer_stack_top) > 0)
59057  --(yy_buffer_stack_top);
59058 
59059  if (YY_CURRENT_BUFFER) {
59062  }
59063 }
#define YY_CURRENT_BUFFER_LVALUE
void fortranscannerYY_delete_buffer(YY_BUFFER_STATE b)
static int yy_did_buffer_switch_on_eof
#define YY_CURRENT_BUFFER
static void fortranscannerYY_load_buffer_state(void)
static size_t yy_buffer_stack_top
void fortranscannerYYpush_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 59019 of file fortranscanner.cpp.

59020 {
59021  if (new_buffer == NULL)
59022  return;
59023 
59025 
59026  /* This block is copied from fortranscannerYY_switch_to_buffer. */
59027  if ( YY_CURRENT_BUFFER )
59028  {
59029  /* Flush out information for old buffer. */
59030  *(yy_c_buf_p) = (yy_hold_char);
59031  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
59032  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
59033  }
59034 
59035  /* Only push if top exists. Otherwise, replace top. */
59036  if (YY_CURRENT_BUFFER)
59037  (yy_buffer_stack_top)++;
59038  YY_CURRENT_BUFFER_LVALUE = new_buffer;
59039 
59040  /* copied from fortranscannerYY_switch_to_buffer. */
59043 }
#define YY_CURRENT_BUFFER_LVALUE
static int yy_did_buffer_switch_on_eof
static void fortranscannerYYensure_buffer_stack(void)
static char yy_hold_char
#define YY_CURRENT_BUFFER
static void fortranscannerYY_load_buffer_state(void)
static char * yy_c_buf_p
static size_t yy_buffer_stack_top
static int yy_n_chars
void * fortranscannerYYrealloc ( void *  ptr,
yy_size_t  size 
)

Definition at line 59436 of file fortranscanner.cpp.

59437 {
59438  /* The cast to (char *) in the following accommodates both
59439  * implementations that use char* generic pointers, and those
59440  * that use void* generic pointers. It works with the latter
59441  * because both ANSI C and C++ allow castless assignment from
59442  * any pointer type to void*, and deal with argument conversions
59443  * as though doing an assignment.
59444  */
59445  return (void *) realloc( (char *) ptr, size );
59446 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void fortranscannerYYrestart ( 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 58853 of file fortranscanner.cpp.

58854 {
58855 
58856  if ( ! YY_CURRENT_BUFFER ){
58860  }
58861 
58864 }
#define YY_CURRENT_BUFFER_LVALUE
static void fortranscannerYYensure_buffer_stack(void)
FILE * fortranscannerYYin
#define YY_CURRENT_BUFFER
static void fortranscannerYY_load_buffer_state(void)
#define YY_BUF_SIZE
static void fortranscannerYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
YY_BUFFER_STATE fortranscannerYY_create_buffer(FILE *file, int size)
void fortranscannerYYset_debug ( int  debug_flag)

Definition at line 59336 of file fortranscanner.cpp.

59337 {
59338  fortranscannerYY_flex_debug = bdebug ;
59339 }
int fortranscannerYY_flex_debug
void fortranscannerYYset_extra ( YY_EXTRA_TYPE  user_defined)
void fortranscannerYYset_in ( FILE *  in_str)

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

Parameters
in_strA readable stream.
See also
fortranscannerYY_switch_to_buffer

Definition at line 59321 of file fortranscanner.cpp.

59322 {
59323  fortranscannerYYin = in_str ;
59324 }
FILE * fortranscannerYYin
void fortranscannerYYset_lineno ( int  line_number)

Set the current line number.

Parameters
line_number

Definition at line 59309 of file fortranscanner.cpp.

59310 {
59311 
59312  fortranscannerYYlineno = line_number;
59313 }
int fortranscannerYYlineno
void fortranscannerYYset_out ( FILE *  out_str)

Definition at line 59326 of file fortranscanner.cpp.

59327 {
59328  fortranscannerYYout = out_str ;
59329 }
FILE * fortranscannerYYout
static int getAmpersandAtTheStart ( const char *  buf,
int  length 
)
static

Definition at line 59513 of file fortranscanner.cpp.

59514 {
59515  for(int i=0; i<length; i++) {
59516  switch(buf[i]) {
59517  case ' ':
59518  case '\t':
59519  break;
59520  case '&':
59521  return i;
59522  default:
59523  return -1;
59524  }
59525  }
59526  return -1;
59527 }
static int getAmpOrExclAtTheEnd ( const char *  buf,
int  length 
)
static

Definition at line 59530 of file fortranscanner.cpp.

59531 {
59532  // Avoid ampersands in string and comments
59533  int parseState = Start;
59534  char quoteSymbol = 0;
59535  int ampIndex = -1;
59536  int commentIndex = -1;
59537 
59538  for(int i=0; i<length && parseState!=Comment; i++)
59539  {
59540  // When in string, skip backslashes
59541  // Legacy code, not sure whether this is correct?
59542  if(parseState==String)
59543  {
59544  if(buf[i]=='\\') i++;
59545  }
59546 
59547  switch(buf[i])
59548  {
59549  case '\'':
59550  case '"':
59551  // Close string, if quote symbol matches.
59552  // Quote symbol is set iff parseState==String
59553  if(buf[i]==quoteSymbol)
59554  {
59555  parseState = Start;
59556  quoteSymbol = 0;
59557  }
59558  // Start new string, if not already in string or comment
59559  else if(parseState==Start)
59560  {
59561  parseState = String;
59562  quoteSymbol = buf[i];
59563  }
59564  ampIndex = -1; // invalidate prev ampersand
59565  break;
59566  case '!':
59567  // When in string or comment, ignore exclamation mark
59568  if(parseState==Start)
59569  {
59570  parseState = Comment;
59571  commentIndex = i;
59572  }
59573  break;
59574  case ' ': // ignore whitespace
59575  case '\t':
59576  case '\n': // this may be at the end of line
59577  break;
59578  case '&':
59579  ampIndex = i;
59580  break;
59581  default:
59582  ampIndex = -1; // invalidate prev ampersand
59583  }
59584  }
59585 
59586  if (ampIndex>=0)
59587  return ampIndex;
59588  else
59589  return commentIndex;
59590 }
#define String
#define Comment
#define Start
static Argument * getParameter ( const QCString name)
static

Get the argument name.

Definition at line 60467 of file fortranscanner.cpp.

60468 {
60469  // std::cout<<"addFortranParameter(): "<<name<<" DOCS:"<<(docs.isNull()?QCString("null"):docs)<<std::endl;
60470  Argument *ret = 0;
60471  if (current_root->argList==0) return 0;
60473  Argument *a;
60474  for (ali.toFirst();(a=ali.current());++ali)
60475  {
60476  if (a->name.lower()==name.lower())
60477  {
60478  ret=a;
60479  //printf("parameter found: %s\n",(const char*)name);
60480  break;
60481  }
60482  } // for
60483  return ret;
60484 }
ArgumentList * argList
member arguments as a list
Definition: entry.h:254
static Entry * current_root
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
const double a
QCString name
Definition: arguments.h:69
QCString lower() const
Definition: qcstring.cpp:263
static void handleCommentBlock ( const QCString doc,
bool  brief 
)
static

Definition at line 60503 of file fortranscanner.cpp.

60504 {
60505  bool needsEntry = FALSE;
60506  static bool hideInBodyDocs = Config_getBool("HIDE_IN_BODY_DOCS");
60507  int position=0;
60508  if (docBlockInBody && hideInBodyDocs)
60509  {
60511  return;
60512  }
60513  DBG_CTX((stderr,"call parseCommentBlock [%s]\n",doc.data()));
60514  int lineNr = brief ? current->briefLine : current->docLine;
60515  while (parseCommentBlock(
60516  g_thisParser,
60518  doc, // text
60519  yyFileName, // file
60520  lineNr,
60521  docBlockInBody ? FALSE : brief,
60525  position,
60526  needsEntry
60527  ))
60528  {
60529  DBG_CTX((stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry));
60530  if (needsEntry) addCurrentEntry(0);
60531  }
60532  DBG_CTX((stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry));
60533 
60534  if (needsEntry) addCurrentEntry(0);
60535  docBlockInBody = FALSE;
60536 }
bool brief
static bool docBlockInBody
static void addCurrentEntry(int case_insens)
static Protection defaultProtection
static Entry * current
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
#define DBG_CTX(x)
const char * data() const
Definition: qcstring.h:207
#define Config_getBool(val)
Definition: config.cpp:664
type * getFirst() const
Definition: qlist.h:95
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 bool docBlockJavaStyle
static QList< Entry > subrCurrent
QCString doc
static QCString yyFileName
static ParserInterface * g_thisParser
if ( yy_init)

Definition at line 56945 of file fortranscanner.cpp.

56946  {
56947  (yy_init) = 1;
56948 
56949 #ifdef YY_USER_INIT
56950  YY_USER_INIT;
56951 #endif
56952 
56953  /* Create the reject buffer large enough to save one state per allowed character. */
56954  if ( ! (yy_state_buf) )
56956  if ( ! (yy_state_buf) )
56957  YY_FATAL_ERROR( "out of dynamic memory in fortranscannerYYlex()" );
56958 
56959  if ( ! (yy_start) )
56960  (yy_start) = 1; /* first start state */
56961 
56962  if ( ! fortranscannerYYin )
56963  fortranscannerYYin = stdin;
56964 
56965  if ( ! fortranscannerYYout )
56967 
56968  if ( ! YY_CURRENT_BUFFER ) {
56972  }
56973 
56975  }
#define YY_CURRENT_BUFFER_LVALUE
static int yy_start
static yy_state_type * yy_state_buf
static void fortranscannerYYensure_buffer_stack(void)
FILE * fortranscannerYYin
#define YY_CURRENT_BUFFER
int yy_state_type
Definition: code.cpp:361
static void fortranscannerYY_load_buffer_state(void)
static int yy_init
#define YY_BUF_SIZE
FILE * fortranscannerYYout
#define YY_STATE_BUF_SIZE
YY_BUFFER_STATE fortranscannerYY_create_buffer(FILE *file, int size)
void * fortranscannerYYalloc(yy_size_t)
#define YY_FATAL_ERROR(msg)
static void initEntry ( )
static

Definition at line 60336 of file fortranscanner.cpp.

60337 {
60338  if (typeMode)
60339  {
60341  }
60342  else
60343  {
60345  }
60346  current->mtype = mtype;
60347  current->virt = virt;
60348  current->stat = gstat;
60351 }
bool stat
static ?
Definition: entry.h:245
static Protection typeProtection
static Protection defaultProtection
static Entry * current
static bool gstat
Protection protection
class protection
Definition: entry.h:241
void initGroupInfo(Entry *e)
Specifier virt
virtualness of the entry
Definition: entry.h:251
static int typeMode
static Specifier virt
MethodTypes mtype
signal, slot, (dcop) method, or property?
Definition: entry.h:242
SrcLangExt lang
programming language in which this entry was found
Definition: entry.h:286
static MethodTypes mtype
static void initParser ( )
static

Definition at line 60331 of file fortranscanner.cpp.

60332 {
60333  last_entry = 0;
60334 }
static Entry * last_entry
static void insertCharacter ( char *  contents,
int  length,
int  pos,
char  c 
)
static

Definition at line 59652 of file fortranscanner.cpp.

59653 {
59654  // shift tail by one character
59655  for(int i=length; i>pos; i--)
59656  contents[i]=contents[i-1];
59657  // set the character
59658  contents[pos] = c;
59659 }
static CommentInPrepass * locatePrepassComment ( int  from,
int  to 
)
static

Definition at line 59490 of file fortranscanner.cpp.

59490  {
59491  //printf("Locate %d-%d\n", from, to);
59492  for(uint i=0; i<comments.count(); i++) { // todo: optimize
59493  int c = comments.at(i)->column;
59494  //printf("Candidate %d\n", c);
59495  if (c>=from && c<=to) {
59496  // comment for previous variable or parameter
59497  return comments.at(i);
59498  }
59499  }
59500  return NULL;
59501 }
static QList< CommentInPrepass > comments
unsigned uint
Definition: qglobal.h:351
static int max ( int  a,
int  b 
)
static

Definition at line 60366 of file fortranscanner.cpp.

60366 {return a>b?a:b;}
const double a
static bool * b
Definition: config.cpp:1043
static void newLine ( )
static

Definition at line 59483 of file fortranscanner.cpp.

59483  {
59484  yyLineNr++;
59486  lineCountPrepass=0;
59487  comments.clear();
59488 }
static int yyLineNr
static QList< CommentInPrepass > comments
static int lineCountPrepass
static void parseMain ( const char *  fileName,
const char *  fileBuf,
Entry rt,
FortranFormat  format 
)
static

Definition at line 60702 of file fortranscanner.cpp.

60703 {
60704  char *tmpBuf = NULL;
60705  initParser();
60706 
60708  inputString = fileBuf;
60709  inputPosition = 0;
60710  inputStringPrepass = NULL;
60712 
60713  //anonCount = 0; // don't reset per file
60714  mtype = Method;
60715  gstat = FALSE;
60716  virt = Normal;
60717  current_root = rt;
60718  global_root = rt;
60720  if (inputFile.open(IO_ReadOnly))
60721  {
60723 
60724  if (isFixedForm)
60725  {
60726  msg("Prepassing fixed form of %s\n", fileName);
60727  //printf("---strlen=%d\n", strlen(fileBuf));
60728  //clock_t start=clock();
60729 
60730  inputString = prepassFixedForm(fileBuf);
60731 
60732  //clock_t end=clock();
60733  //printf("CPU time used=%f\n", ((double) (end-start))/CLOCKS_PER_SEC);
60734  }
60735  else if (inputString[strlen(fileBuf)-1] != '\n')
60736  {
60737  tmpBuf = (char *)malloc(strlen(fileBuf)+2);
60738  strcpy(tmpBuf,fileBuf);
60739  tmpBuf[strlen(fileBuf)]= '\n';
60740  tmpBuf[strlen(fileBuf)+1]= '\000';
60741  inputString = tmpBuf;
60742  }
60743 
60744  yyLineNr= 1 ;
60745  yyFileName = fileName;
60746  msg("Parsing file %s...\n",yyFileName.data());
60747 
60748  startScope(rt); // implies current_root = rt
60749  initParser();
60751 
60752  current = new Entry;
60754  current->name = yyFileName;
60757  file_root = current;
60758  current = new Entry;
60760 
60762  {
60763  BEGIN( Start );
60764  }
60765 
60768 
60769  endScope(current_root, TRUE); // TRUE - global root
60770 
60771  //debugCompounds(rt); //debug
60772 
60773  rt->program.resize(0);
60774  delete current; current=0;
60776  if (tmpBuf) {
60777  free((char*)tmpBuf);
60778  inputString=NULL;
60779  }
60780  if (isFixedForm) {
60781  free((char*)inputString);
60782  inputString=NULL;
60783  }
60784 
60785  inputFile.close();
60786  }
60787 }
QGString program
the program text
Definition: entry.h:256
static const char * prepassFixedForm(const char *contents)
void msg(const char *fmt,...)
Definition: message.cpp:107
static QCString inputStringPrepass
Input string for prepass of line cont. &#39;&&#39;.
static int yyLineNr
#define BEGIN
Definition: entry.h:63
Definition: types.h:26
static Protection defaultProtection
FILE * fortranscannerYYin
static Entry * current
void fortranscannerYYrestart(FILE *input_file)
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
Definition: qstring.cpp:11496
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 bool endScope(Entry *scope, bool isGlobalRoot=FALSE)
static bool recognizeFixedForm(const char *contents, FortranFormat format)
void setName(const QString &name)
Definition: qfile.cpp:167
static const char * inputString
static Entry * global_root
Definition: types.h:29
#define IO_ReadOnly
Definition: qiodevice.h:61
static Entry * current_root
static bool isFixedForm
void groupEnterFile(const char *fileName, int)
static bool gstat
fileName
Definition: dumpTree.py:9
Definition: types.h:32
bool open(int)
Definition: qfile_unix.cpp:134
void clear()
Definition: qlist.h:82
static int inputPosition
const char * data() const
Definition: qcstring.h:207
static QFile inputFile
static void startScope(Entry *scope)
static Specifier virt
static QList< Entry > moduleProcedures
static Entry * file_root
void groupLeaveFile(const char *fileName, int line)
static void initParser()
static QCString yyFileName
int fortranscannerYYlex(void)
static unsigned int inputPositionPrepass
SrcLangExt lang
programming language in which this entry was found
Definition: entry.h:286
void close()
Definition: qfile_unix.cpp:614
#define Start
static MethodTypes mtype
const bool TRUE
Definition: qglobal.h:371
int section
entry type (see Sections);
Definition: entry.h:235
static void popBuffer ( )
static

Definition at line 59813 of file fortranscanner.cpp.

59813  {
59814  DBG_CTX((stderr, "--POP--"));
59815  include_stack_ptr --;
59818 }
YY_BUFFER_STATE * include_stack
void fortranscannerYY_delete_buffer(YY_BUFFER_STATE b)
#define DBG_CTX(x)
#define YY_CURRENT_BUFFER
void fortranscannerYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
int include_stack_ptr
static const char* prepassFixedForm ( const char *  contents)
static

Definition at line 59662 of file fortranscanner.cpp.

59663 {
59664  int column=0;
59665  int prevLineLength=0;
59666  int prevLineAmpOrExclIndex=-1;
59667  bool emptyLabel=TRUE;
59668  bool commented=FALSE;
59669  bool inSingle=FALSE;
59670  bool inDouble=FALSE;
59671  bool inBackslash=FALSE;
59672  int newContentsSize = strlen(contents)+3; // \000, \n (when necessary) and one spare character (to avoid reallocation)
59673  char* newContents = (char*)malloc(newContentsSize);
59674 
59675  for(int i=0, j=0;;i++,j++) {
59676  if(j>=newContentsSize-3) { // check for spare characters, which may be eventually used below (by & and '! ')
59677  newContents = (char*)realloc(newContents, newContentsSize+1000);
59678  newContentsSize = newContentsSize+1000;
59679  }
59680 
59681  column++;
59682  char c = contents[i];
59683  switch(c) {
59684  case '\n':
59685  prevLineLength=column;
59686  prevLineAmpOrExclIndex=getAmpOrExclAtTheEnd(&contents[i-prevLineLength+1], prevLineLength);
59687  column=0;
59688  emptyLabel=TRUE;
59689  commented=FALSE;
59690  newContents[j]=c;
59691  break;
59692  case ' ':
59693  case '\t':
59694  newContents[j]=c;
59695  break;
59696  case '\000':
59697  newContents[j]='\000';
59698  newContentsSize = strlen(newContents);
59699  if (newContents[newContentsSize - 1] != '\n')
59700  {
59701  // to be on the safe side
59702  newContents = (char*)realloc(newContents, newContentsSize+2);
59703  newContents[newContentsSize] = '\n';
59704  newContents[newContentsSize + 1] = '\000';
59705  }
59706  return newContents;
59707  case '"':
59708  case '\'':
59709  case '\\':
59710  if ((column <= fixedCommentAfter) && (column!=6) && !commented)
59711  {
59712  // we have some special cases in respect to strings and exscaped string characters
59713  newContents[j]=c;
59714  if (c == '\\')
59715  {
59716  inBackslash = !inBackslash;
59717  break;
59718  }
59719  else if (c == '\'')
59720  {
59721  if (!inDouble) inSingle = !inSingle;
59722  break;
59723  }
59724  else if (c == '"')
59725  {
59726  if (!inSingle) inDouble = !inDouble;
59727  break;
59728  }
59729  }
59730  inBackslash = FALSE;
59731  // fallthrough
59732  case 'C':
59733  case 'c':
59734  case '*':
59735  case '!':
59736  if ((column <= fixedCommentAfter) && (column!=6))
59737  {
59738  emptyLabel=FALSE;
59739  if(column==1)
59740  {
59741  newContents[j]='!';
59742  commented = TRUE;
59743  }
59744  else if ((c == '!') && !inDouble && !inSingle)
59745  {
59746  newContents[j]=c;
59747  commented = TRUE;
59748  }
59749  else
59750  {
59751  newContents[j]=c;
59752  }
59753  break;
59754  }
59755  // fallthrough
59756  default:
59757  if(column==6 && emptyLabel) { // continuation
59758  if (c != '0') { // 0 not allowed as continuation character, see f95 standard paragraph 3.3.2.3
59759  newContents[j]=' ';
59760 
59761  if(prevLineAmpOrExclIndex==-1) { // add & just before end of previous line
59762  insertCharacter(newContents, j+1, (j+1)-6-1, '&');
59763  j++;
59764  } else { // add & just before end of previous line comment
59765  insertCharacter(newContents, j+1, (j+1)-6-prevLineLength+prevLineAmpOrExclIndex, '&');
59766  j++;
59767  }
59768  } else {
59769  newContents[j]=c; // , just handle like space
59770  }
59771  } else if ((column > fixedCommentAfter) && !commented) {
59772  // first non commented non blank character after position fixedCommentAfter
59773  if (c != '!') {
59774  // I'm not a possible start of doxygen comment
59775  newContents[j++]='!';
59776  newContents[j++]=' '; // so that '<' and '>' as first character are not converted to doxygen comment
59777  }
59778  newContents[j]=c;
59779  commented = TRUE;
59780  } else {
59781  newContents[j]=c;
59782  emptyLabel=FALSE;
59783  }
59784  break;
59785  }
59786  }
59787 
59788  newContentsSize = strlen(newContents);
59789  if (newContents[newContentsSize - 1] != '\n')
59790  {
59791  // to be on the safe side
59792  newContents = (char*)realloc(newContents, newContentsSize+2);
59793  newContents[newContentsSize] = '\n';
59794  newContents[newContentsSize + 1] = '\000';
59795  }
59796  return newContents;
59797 }
const bool FALSE
Definition: qglobal.h:370
const int fixedCommentAfter
Definition: fortrancode.h:37
static void insertCharacter(char *contents, int length, int pos, char c)
std::vector< std::string > column
static int getAmpOrExclAtTheEnd(const char *buf, int length)
const bool TRUE
Definition: qglobal.h:371
static void pushBuffer ( QCString buffer)
static

Definition at line 59799 of file fortranscanner.cpp.

59800 {
59802  {
59805  }
59808 
59809  DBG_CTX((stderr, "--PUSH--%s", (const char *)buffer));
59810  buffer = NULL;
59811 }
YY_BUFFER_STATE * include_stack
#define DBG_CTX(x)
#define YY_CURRENT_BUFFER
void fortranscannerYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
int include_stack_ptr
int include_stack_cnt
YY_BUFFER_STATE fortranscannerYY_scan_string(yyconst char *yy_str)
static bool recognizeFixedForm ( const char *  contents,
FortranFormat  format 
)
static

Definition at line 59609 of file fortranscanner.cpp.

59610 {
59611  int column=0;
59612  bool skipLine=FALSE;
59613 
59614  if (format == FortranFormat_Fixed) return TRUE;
59615  if (format == FortranFormat_Free) return FALSE;
59616 
59617  for(int i=0;;i++) {
59618  column++;
59619 
59620  switch(contents[i]) {
59621  case '\n':
59622  column=0;
59623  skipLine=FALSE;
59624  break;
59625  case ' ':
59626  break;
59627  case '\000':
59628  return FALSE;
59629  case '#':
59630  skipLine=TRUE;
59631  break;
59632  case 'C':
59633  case 'c':
59634  case '*':
59635  if(column==1) return TRUE;
59636  if(skipLine) break;
59637  return FALSE;
59638  case '!':
59639  if(column>1 && column<7) return FALSE;
59640  skipLine=TRUE;
59641  break;
59642  default:
59643  if(skipLine) break;
59644  if(column==7) return TRUE;
59645  return FALSE;
59646  }
59647  }
59648  return FALSE;
59649 }
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
Definition: qstring.cpp:11496
const bool FALSE
Definition: qglobal.h:370
std::vector< std::string > column
const bool TRUE
Definition: qglobal.h:371
void resolveModuleProcedures ( QList< Entry > &  moduleProcedures,
Entry current_root 
)
static

fill empty interface module procedures with info from corresponding module subprogs : handle procedures in used modules

Definition at line 59838 of file fortranscanner.cpp.

59839 {
59840  if (moduleProcedures.isEmpty()) return;
59841 
59842  EntryListIterator eli1(moduleProcedures);
59843  // for all module procedures
59844  for (Entry *ce1; (ce1=eli1.current()); ++eli1)
59845  {
59846  // check all entries in this module
59847  EntryListIterator eli2(*current_root->children());
59848  for (Entry *ce2; (ce2=eli2.current()); ++eli2)
59849  {
59850  if (ce1->name == ce2->name)
59851  {
59852  copyEntry(ce1, ce2);
59853  }
59854  } // for procedures in current module
59855  } // for all interface module procedures
59856  moduleProcedures.clear();
59857 }
Definition: entry.h:63
static void copyEntry(Entry *dest, Entry *src)
bool isEmpty() const
Definition: qlist.h:67
const QList< Entry > * children() const
Definition: entry.h:210
void clear()
Definition: qlist.h:82
static void scanner_abort ( )
static

Definition at line 60847 of file fortranscanner.cpp.

60848 {
60849  fprintf(stderr,"********************************************************************\n");
60850  fprintf(stderr,"Error in file %s line: %d, state: %d\n",yyFileName.data(),yyLineNr,YY_START);
60851  fprintf(stderr,"********************************************************************\n");
60852 
60854  Entry *ce;
60855  bool start=FALSE;
60856 
60857  for (;(ce=eli.current());++eli)
60858  {
60859  if (ce == file_root) start=TRUE;
60860  if (start) ce->reset();
60861  }
60862 
60863  // dummy call to avoid compiler warning
60864  (void)yy_top_state();
60865 
60866  return;
60867  //exit(-1);
60868 }
static int yy_top_state(void)
static int yyLineNr
Definition: entry.h:63
const bool FALSE
Definition: qglobal.h:370
static Entry * global_root
const QList< Entry > * children() const
Definition: entry.h:210
const char * data() const
Definition: qcstring.h:207
#define YY_START
static Entry * file_root
static QCString yyFileName
const bool TRUE
Definition: qglobal.h:371
static void startCommentBlock ( bool  brief)
static

Definition at line 60487 of file fortranscanner.cpp.

60488 {
60489  if (brief)
60490  {
60493  }
60494  else
60495  {
60498  }
60499 }
bool brief
static int yyLineNr
static Entry * current
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
QCString docFile
file in which the documentation was found
Definition: entry.h:262
static QCString yyFileName
QCString briefFile
file in which the brief desc. was found
Definition: entry.h:265
static void startScope ( Entry scope)
static

Starts the new scope in fortran program. Consider using this function when starting module, interface, function or other program block.

See also
endScope()

Definition at line 60197 of file fortranscanner.cpp.

60198 {
60199  //cout<<"start scope: "<<scope->name<<endl;
60200  current_root= scope; /* start substructure */
60201 
60203  modifiers.insert(scope, mdfMap);
60204 }
static QMap< Entry *, QMap< QCString, SymbolModifiers > > modifiers
Holds program scope->symbol name->symbol modifiers.
static QCString scope
Definition: declinfo.cpp:668
static Entry * current_root
Definition: qmap.h:501
static void subrHandleCommentBlock ( const QCString doc,
bool  brief 
)
static

Handle parameter description as defined after the declaration of the parameter.

Definition at line 60540 of file fortranscanner.cpp.

60541 {
60542  QCString loc_doc;
60543  loc_doc = doc.stripWhiteSpace();
60544 
60545  Entry *tmp_entry = current;
60546  current = subrCurrent.getFirst(); // temporarily switch to the entry of the subroutine / function
60547 
60548  // Still in the specification section so no inbodyDocs yet, but parameter documentation
60549  current->inbodyDocs = "";
60550 
60551  // strip \\param or @param, so we can do some extra checking. We will add it later on again.
60552  if (!loc_doc.stripPrefix("\\param") &&
60553  !loc_doc.stripPrefix("@param")
60554  ) (void)loc_doc; // Do nothing work has been done by stripPrefix; (void)loc_doc: to overcome 'empty controlled statement' warning
60555  loc_doc.stripWhiteSpace();
60556 
60557  // direction as defined with the declaration of the parameter
60558  int dir1 = modifiers[current_root][argName.lower()].direction;
60559  // in description [in] is specified
60560  if (loc_doc.lower().find(directionParam[SymbolModifiers::IN]) == 0)
60561  {
60562  // check if with the declaration intent(in) or nothing has been specified
60565  {
60566  // strip direction
60567  loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::IN]));
60568  loc_doc.stripWhiteSpace();
60569  // in case of emty documentation or (now) just name, consider it as no documemntation
60570  if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
60571  {
60572  // reset current back to the part inside the routine
60573  current=tmp_entry;
60574  return;
60575  }
60576  handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::IN] + " " +
60577  argName + " " + loc_doc,brief);
60578  }
60579  else
60580  {
60581  // something different specified, give warning and leave error.
60582  warn(yyFileName,yyLineNr, "Routine: " + current->name + current->args +
60583  " inconsistency between intent attribute and documentation for parameter: " + argName);
60584  handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " +
60585  argName + " " + loc_doc,brief);
60586  }
60587  }
60588  // analogous to the [in] case, here [out] direction specified
60589  else if (loc_doc.lower().find(directionParam[SymbolModifiers::OUT]) == 0)
60590  {
60591  if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) ||
60593  {
60594  loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::OUT]));
60595  loc_doc.stripWhiteSpace();
60596  if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
60597  {
60598  current=tmp_entry;
60599  return;
60600  }
60601  handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::OUT] + " " +
60602  argName + " " + loc_doc,brief);
60603  }
60604  else
60605  {
60606  warn(yyFileName,yyLineNr, "Routine: " + current->name + current->args +
60607  " inconsistency between intent attribute and documentation for parameter: " + argName);
60608  handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " +
60609  argName + " " + loc_doc,brief);
60610  }
60611  }
60612  // analogous to the [in] case, here [in,out] direction specified
60613  else if (loc_doc.lower().find(directionParam[SymbolModifiers::INOUT]) == 0)
60614  {
60615  if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) ||
60617  {
60618  loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::INOUT]));
60619  loc_doc.stripWhiteSpace();
60620  if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
60621  {
60622  current=tmp_entry;
60623  return;
60624  }
60625  handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::INOUT] + " " +
60626  argName + " " + loc_doc,brief);
60627  }
60628  else
60629  {
60630  warn(yyFileName,yyLineNr, "Routine: " + current->name + current->args +
60631  " inconsistency between intent attribute and documentation for parameter: " + argName);
60632  handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " +
60633  argName + " " + loc_doc,brief);
60634  }
60635  }
60636  // analogous to the [in] case; here no direction specified
60637  else
60638  {
60639  if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
60640  {
60641  current=tmp_entry;
60642  return;
60643  }
60644  handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " +
60645  argName + " " + loc_doc,brief);
60646  }
60647 
60648  // reset current back to the part inside the routine
60649  current=tmp_entry;
60650 }
static QMap< Entry *, QMap< QCString, SymbolModifiers > > modifiers
Holds program scope->symbol name->symbol modifiers.
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool brief
bool isEmpty() const
Definition: qcstring.h:189
static int yyLineNr
uint length() const
Definition: qcstring.h:195
Definition: entry.h:63
static Entry * current
QCString name
member name
Definition: entry.h:237
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static void handleCommentBlock(const QCString &doc, bool brief)
static Entry * current_root
QCString right(uint len) const
Definition: qcstring.cpp:231
static QCString argName
QCString args
member argument string
Definition: entry.h:252
type * getFirst() const
Definition: qlist.h:95
void warn(const char *file, int line, const char *fmt,...)
Definition: message.cpp:183
QCString inbodyDocs
documentation inside the body of a function
Definition: entry.h:266
static QList< Entry > subrCurrent
static QCString yyFileName
QCString lower() const
Definition: qcstring.cpp:263
static const char * directionParam[]
static void subrHandleCommentBlockResult ( const QCString doc,
bool  brief 
)
static

Handle result description as defined after the declaration of the parameter.

Definition at line 60653 of file fortranscanner.cpp.

60654 {
60655  QCString loc_doc;
60656  loc_doc = doc.stripWhiteSpace();
60657 
60658  Entry *tmp_entry = current;
60659  current = subrCurrent.getFirst(); // temporarily switch to the entry of the subroutine / function
60660 
60661  // Still in the specification section so no inbodyDocs yet, but parameter documentation
60662  current->inbodyDocs = "";
60663 
60664  // strip \\returns or @returns. We will add it later on again.
60665  if (!loc_doc.stripPrefix("\\returns") &&
60666  !loc_doc.stripPrefix("\\return") &&
60667  !loc_doc.stripPrefix("@returns") &&
60668  !loc_doc.stripPrefix("@return")
60669  ) (void)loc_doc; // Do nothing work has been done by stripPrefix; (void)loc_doc: to overcome 'empty controlled statement' warning
60670  loc_doc.stripWhiteSpace();
60671 
60672  if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
60673  {
60674  current=tmp_entry;
60675  return;
60676  }
60677  handleCommentBlock(QCString("\n\n@returns ") + loc_doc,brief);
60678 
60679  // reset current back to the part inside the routine
60680  current=tmp_entry;
60681 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool brief
bool isEmpty() const
Definition: qcstring.h:189
Definition: entry.h:63
static Entry * current
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
static void handleCommentBlock(const QCString &doc, bool brief)
static QCString argName
type * getFirst() const
Definition: qlist.h:95
QCString inbodyDocs
documentation inside the body of a function
Definition: entry.h:266
static QList< Entry > subrCurrent
QCString lower() const
Definition: qcstring.cpp:263
void truncatePrepass ( int  index)
static

Definition at line 59595 of file fortranscanner.cpp.

59596 {
59597  int length = inputStringPrepass.length();
59598  for (int i=index+1; i<length; i++) {
59599  if (inputStringPrepass[i]=='!' && i<length-1 && inputStringPrepass[i+1]=='<') { // save comment
59601  comments.append(c);
59602  }
59603  }
59605 }
static QCString inputStringPrepass
Input string for prepass of line cont. &#39;&&#39;.
uint length() const
Definition: qcstring.h:195
static QList< CommentInPrepass > comments
QCString right(uint len) const
Definition: qcstring.cpp:231
CommentInPrepass(int column, QCString str)
bool truncate(uint pos)
Definition: qcstring.h:232
static void updateVariablePrepassComment ( int  from,
int  to 
)
static

Definition at line 59503 of file fortranscanner.cpp.

59503  {
59505  if (c!=NULL && v_type == V_VARIABLE) {
59506  last_entry->brief = c->str;
59507  } else if (c!=NULL && v_type == V_PARAMETER) {
59509  if (parameter) parameter->docs = c->str;
59510  }
59511 }
static CommentInPrepass * locatePrepassComment(int from, int to)
static Argument * parameter
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
static Argument * getParameter(const QCString &name)
QCString brief
brief description (doc block)
Definition: entry.h:263
static Entry * last_entry
static QCString argName
static ScanVar v_type
QCString docs
Definition: arguments.h:72
while ( )

Definition at line 56977 of file fortranscanner.cpp.

56978  {
56979  yy_cp = (yy_c_buf_p);
56980 
56981  /* Support of fortranscannerYYtext. */
56982  *yy_cp = (yy_hold_char);
56983 
56984  /* yy_bp points to the position in yy_ch_buf of the start of
56985  * the current run.
56986  */
56987  yy_bp = yy_cp;
56988 
56989  yy_current_state = (yy_start);
56990  yy_current_state += YY_AT_BOL();
56991 
56992  (yy_state_ptr) = (yy_state_buf);
56993  *(yy_state_ptr)++ = yy_current_state;
56994 
56995 yy_match:
56996  do
56997  {
56998  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
56999  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
57000  {
57001  yy_current_state = (int) yy_def[yy_current_state];
57002  if ( yy_current_state >= 24248 )
57003  yy_c = yy_meta[(unsigned int) yy_c];
57004  }
57005  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
57006  *(yy_state_ptr)++ = yy_current_state;
57007  ++yy_cp;
57008  }
57009  while ( yy_current_state != 24247 );
57010 
57011 yy_find_action:
57012  yy_current_state = *--(yy_state_ptr);
57013  (yy_lp) = yy_accept[yy_current_state];
57014 find_rule: /* we branch to this label when backing up */
57015  for ( ; ; ) /* until we find what rule we matched */
57016  {
57017  if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
57018  {
57019  yy_act = yy_acclist[(yy_lp)];
57020  if ( yy_act & YY_TRAILING_HEAD_MASK ||
57022  {
57024  {
57027  break;
57028  }
57029  }
57030  else if ( yy_act & YY_TRAILING_MASK )
57031  {
57032  (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
57034  (yy_full_match) = yy_cp;
57036  (yy_full_lp) = (yy_lp);
57037  }
57038  else
57039  {
57040  (yy_full_match) = yy_cp;
57042  (yy_full_lp) = (yy_lp);
57043  break;
57044  }
57045  ++(yy_lp);
57046  goto find_rule;
57047  }
57048  --yy_cp;
57049  yy_current_state = *--(yy_state_ptr);
57050  (yy_lp) = yy_accept[yy_current_state];
57051  }
57052 
57054 
57055 do_action: /* This label is used only to access EOF actions. */
57056 
57057  switch ( yy_act )
57058  { /* beginning of action switch */
57059 case 1:
57060 /* rule 1 can match eol */
57062 #line 325 "fortranscanner.l"
57063 { // prepass: look for line continuations
57064  functionLine = FALSE;
57065 
57066  DBG_CTX((stderr, "---%s", fortranscannerYYtext));
57067 
57070  if (indexEnd>=0 && fortranscannerYYtext[indexEnd]!='&') //we are only interested in amp
57071  indexEnd=-1;
57072 
57073  if(indexEnd<0){ // ----- no ampersand as line continuation
57074  if(YY_START == Prepass) { // last line in "continuation"
57075 
57076  // Only take input after initial ampersand
57077  inputStringPrepass+=(const char*)(fortranscannerYYtext+(indexStart+1));
57078 
57079  //printf("BUFFER:%s\n", (const char*)inputStringPrepass);
57081  yyColNr = 0;
57082  yy_pop_state();
57083  } else { // simple line
57084  yyColNr = 0;
57085  REJECT;
57086  }
57087 
57088  } else { // ----- line with continuation
57089  if(YY_START != Prepass) {
57090  comments.setAutoDelete(TRUE);
57091  comments.clear();
57093  }
57094 
57095  int length = inputStringPrepass.length();
57096 
57097  // Only take input after initial ampersand
57098  inputStringPrepass+=(const char*)(fortranscannerYYtext+(indexStart+1));
57099  lineCountPrepass ++;
57100 
57101  // cut off & and remove following comment if present
57102  truncatePrepass(length+indexEnd-(indexStart+1));
57103  }
57104 
57105  }
57106  YY_BREAK
57107 /*------ ignore strings that are not initialization strings */
57108 case 2:
57110 #line 371 "fortranscanner.l"
57111 { if (yy_top_state() == Initialization
57114  }
57115  YY_BREAK
57116 case 3:
57118 #line 375 "fortranscanner.l"
57119 { if (yy_top_state() == Initialization
57122  }
57123  YY_BREAK
57124 case 4:
57126 #line 379 "fortranscanner.l"
57127 { // string ends with next quote without previous backspace
57128  if (fortranscannerYYtext[0]!=stringStartSymbol) { yyColNr -= (int)fortranscannerYYleng; REJECT; } // single vs double quote
57129  if (yy_top_state() == Initialization
57132  yy_pop_state();
57133  }
57134  YY_BREAK
57135 case 5:
57137 #line 386 "fortranscanner.l"
57138 { if (yy_top_state() == Initialization
57141  }
57142  YY_BREAK
57143 case 6:
57145 #line 390 "fortranscanner.l"
57146 { /* string starts */
57147  if (YY_START == StrIgnore) { yyColNr -= (int)fortranscannerYYleng; REJECT; }; // ignore in simple comments
57149  if (yy_top_state() == Initialization
57152  stringStartSymbol=fortranscannerYYtext[0]; // single or double quote
57153  BEGIN(String);
57154  }
57155  YY_BREAK
57156 /*------ ignore simple comment (not documentation comments) */
57157 case 7:
57158 *yy_cp = (yy_hold_char); /* undo effects of setting up fortranscannerYYtext */
57159 (yy_c_buf_p) = yy_cp = yy_bp + 1;
57160 YY_DO_BEFORE_ACTION; /* set up fortranscannerYYtext again */
57162 #line 402 "fortranscanner.l"
57163 { if (YY_START == String) { yyColNr -= (int)fortranscannerYYleng; REJECT; } // "!" is ignored in strings
57164  // skip comment line (without docu comments "!>" "!<" )
57165  /* ignore further "!" and ignore comments in Strings */
57166  if ((YY_START != StrIgnore) && (YY_START != String))
57167  {
57169  BEGIN(StrIgnore);
57170  debugStr="*!";
57171  DBG_CTX((stderr,"start comment %d\n",yyLineNr));
57172  }
57173  }
57174  YY_BREAK
57175 case 8:
57176 /* rule 8 can match eol */
57177 *yy_cp = (yy_hold_char); /* undo effects of setting up fortranscannerYYtext */
57178 (yy_c_buf_p) = yy_cp -= 1;
57179 YY_DO_BEFORE_ACTION; /* set up fortranscannerYYtext again */
57181 #line 413 "fortranscanner.l"
57182 { yy_pop_state(); // comment ends with endline character
57183  DBG_CTX((stderr,"end comment %d %s\n",yyLineNr,debugStr.data()));
57184  } // comment line ends
57185  YY_BREAK
57186 case 9:
57188 #line 416 "fortranscanner.l"
57190  YY_BREAK
57191 /*------ use handling ------------------------------------------------------------*/
57192 case 10:
57194 #line 421 "fortranscanner.l"
57195 {
57196  if(YY_START == Start)
57197  {
57198  addModule(NULL);
57199  yy_push_state(ModuleBody); //anon program
57200  }
57201  yy_push_state(Use);
57202  }
57203  YY_BREAK
57204 case 11:
57206 #line 429 "fortranscanner.l"
57207 {
57208  DBG_CTX((stderr,"using dir %s\n",fortranscannerYYtext));
57213  current = new Entry;
57215  yy_pop_state();
57216  }
57217  YY_BREAK
57218 case 12:
57219 *yy_cp = (yy_hold_char); /* undo effects of setting up fortranscannerYYtext */
57220 (yy_c_buf_p) = yy_cp -= 1;
57221 YY_DO_BEFORE_ACTION; /* set up fortranscannerYYtext again */
57223 #line 439 "fortranscanner.l"
57224 {
57226  }
57227  YY_BREAK
57228 case 13:
57230 #line 442 "fortranscanner.l"
57231 { BEGIN(UseOnly);
57232  }
57233  YY_BREAK
57234 case 14:
57236 #line 444 "fortranscanner.l"
57237 {}
57238  YY_BREAK
57239 case 15:
57241 #line 445 "fortranscanner.l"
57242 {
57247  current = new Entry ;
57249  }
57250  YY_BREAK
57251 case 16:
57252 /* rule 16 can match eol */
57254 #line 453 "fortranscanner.l"
57255 {
57256  yyColNr -= 1;
57257  unput(*fortranscannerYYtext);
57258  yy_pop_state();
57259  }
57260  YY_BREAK
57261 /* INTERFACE definitions */
57262 
57263 case 17:
57265 #line 461 "fortranscanner.l"
57266 { /* variable with interface prefix */ }
57267  YY_BREAK
57268 case 18:
57270 #line 462 "fortranscanner.l"
57271 { ifType = IF_SPECIFIC;
57273  // do not start a scope here, every
57274  // interface body is a scope of its own
57275  }
57276  YY_BREAK
57277 case 19:
57279 #line 468 "fortranscanner.l"
57280 { ifType = IF_ABSTRACT;
57282  // do not start a scope here, every
57283  // interface body is a scope of its own
57284  }
57285  YY_BREAK
57286 case 20:
57287 /* rule 20 can match eol */
57289 #line 474 "fortranscanner.l"
57290 { ifType = IF_GENERIC;
57291  current->bodyLine = yyLineNr + lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account.
57293 
57294  // extract generic name
57295  QCString name = QCString(fortranscannerYYtext).stripWhiteSpace();
57296  name = name.right(name.length() - 9).stripWhiteSpace().lower();
57297  addInterface(name, ifType);
57299  }
57300  YY_BREAK
57301 
57302 case 21:
57304 #line 486 "fortranscanner.l"
57305 {
57306  // end scope only if GENERIC interface
57308  if (ifType == IF_GENERIC && !endScope(current_root))
57309  yyterminate();
57310 
57311  ifType = IF_NONE;
57312  yy_pop_state();
57313  }
57314  YY_BREAK
57315 case 22:
57317 #line 495 "fortranscanner.l"
57320  }
57321  YY_BREAK
57322 case 23:
57324 #line 498 "fortranscanner.l"
57325 { if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
57326  {
57327  addInterface(fortranscannerYYtext, ifType);
57329  }
57330 
57334  addCurrentEntry(1);
57335  }
57336  YY_BREAK
57337 case 24:
57338 /* rule 24 can match eol */
57340 #line 509 "fortranscanner.l"
57341 { yyColNr -= 1;
57342  unput(*fortranscannerYYtext);
57343  yy_pop_state();
57344  }
57345  YY_BREAK
57346 case 25:
57348 #line 513 "fortranscanner.l"
57349 {}
57350  YY_BREAK
57351 /*-- Contains handling --*/
57352 case 26:
57353 /* rule 26 can match eol */
57355 #line 516 "fortranscanner.l"
57356 {
57357  if(YY_START == Start)
57358  {
57359  addModule(NULL);
57360  yy_push_state(ModuleBodyContains); //anon program
57361  }
57362  }
57363  YY_BREAK
57364 case 27:
57365 /* rule 27 can match eol */
57367 #line 523 "fortranscanner.l"
57369  YY_BREAK
57370 case 28:
57371 /* rule 28 can match eol */
57373 #line 524 "fortranscanner.l"
57375  YY_BREAK
57376 case 29:
57377 /* rule 29 can match eol */
57379 #line 525 "fortranscanner.l"
57381  YY_BREAK
57382 /*------ module handling ------------------------------------------------------------*/
57383 case 30:
57385 #line 528 "fortranscanner.l"
57386 { //
57387  v_type = V_IGNORE;
57390  }
57391  YY_BREAK
57392 case 31:
57394 #line 533 "fortranscanner.l"
57395 { //
57396  v_type = V_IGNORE;
57397  if(fortranscannerYYtext[0]=='m' || fortranscannerYYtext[0]=='M')
57399  else
57402  }
57403  YY_BREAK
57404 case 32:
57405 /* rule 32 can match eol */
57407 #line 541 "fortranscanner.l"
57408 { // end block data
57409  //if (!endScope(current_root))
57410  // yyterminate();
57412  yy_pop_state();
57413  }
57414  YY_BREAK
57415 case 33:
57416 /* rule 33 can match eol */
57418 #line 547 "fortranscanner.l"
57419 { // end module
57421  if (!endScope(current_root))
57422  yyterminate();
57424  yy_pop_state();
57425  }
57426  YY_BREAK
57427 case 34:
57429 #line 554 "fortranscanner.l"
57430 {
57431  addModule(fortranscannerYYtext, TRUE);
57432  BEGIN(ModuleBody);
57433  }
57434  YY_BREAK
57435 case 35:
57437 #line 559 "fortranscanner.l"
57438 {
57439  addModule(fortranscannerYYtext, FALSE);
57440  BEGIN(ModuleBody);
57441  }
57442  YY_BREAK
57443 /*------- access specification --------------------------------------------------------------------------*/
57444 case 36:
57445 /* rule 36 can match eol */
57446 *yy_cp = (yy_hold_char); /* undo effects of setting up fortranscannerYYtext */
57447 (yy_c_buf_p) = yy_cp = yy_bp + 7;
57448 YY_DO_BEFORE_ACTION; /* set up fortranscannerYYtext again */
57450 #line 566 "fortranscanner.l"
57453  }
57454  YY_BREAK
57455 case 37:
57456 /* rule 37 can match eol */
57457 *yy_cp = (yy_hold_char); /* undo effects of setting up fortranscannerYYtext */
57458 (yy_c_buf_p) = yy_cp = yy_bp + 6;
57459 YY_DO_BEFORE_ACTION; /* set up fortranscannerYYtext again */
57461 #line 569 "fortranscanner.l"
57464  }
57465  YY_BREAK
57466 /*------- type definition -------------------------------------------------------------------------------*/
57467 case 38:
57468 /* rule 38 can match eol */
57469 *yy_cp = (yy_hold_char); /* undo effects of setting up fortranscannerYYtext */
57470 (yy_c_buf_p) = yy_cp -= 1;
57471 YY_DO_BEFORE_ACTION; /* set up fortranscannerYYtext again */
57473 #line 575 "fortranscanner.l"
57474 {
57475  if(YY_START == Start)
57476  {
57477  addModule(NULL);
57478  yy_push_state(ModuleBody); //anon program
57479  }
57480 
57484  typeMode = true;
57485  }
57486  YY_BREAK
57487 
57488 case 39:
57490 #line 588 "fortranscanner.l"
57491 {}
57492  YY_BREAK
57493 case 40:
57495 #line 590 "fortranscanner.l"
57496 {}
57497  YY_BREAK
57498 case 41:
57500 #line 592 "fortranscanner.l"
57501 {
57503  }
57504  YY_BREAK
57505 case 42:
57506 /* rule 42 can match eol */
57508 #line 595 "fortranscanner.l"
57509 {
57510  QCString basename = extractFromParens(fortranscannerYYtext);
57511  current->extends->append(new BaseInfo(basename, Public, Normal));
57512  }
57513  YY_BREAK
57514 case 43:
57516 #line 599 "fortranscanner.l"
57517 {
57520  }
57521  YY_BREAK
57522 case 44:
57524 #line 603 "fortranscanner.l"
57525 {
57528  }
57529  YY_BREAK
57530 case 45:
57532 #line 607 "fortranscanner.l"
57533 {
57534  /* ignored for now */
57535  }
57536  YY_BREAK
57537 case 46:
57539 #line 610 "fortranscanner.l"
57540 { /* type name found */
57547 
57548  /* if type is part of a module, mod name is necessary for output */
57549  if ((current_root) &&
57552  {
57553  current->name = current_root->name + "::" + current->name;
57554  }
57555 
57556  addCurrentEntry(1);
57558  BEGIN(TypedefBody);
57559  }
57560  YY_BREAK
57561 
57562 /* Type Bound Procedures */
57563 case 47:
57564 /* rule 47 can match eol */
57566 #line 633 "fortranscanner.l"
57567 {
57568  current->type = QCString(fortranscannerYYtext).simplifyWhiteSpace();
57569  }
57570  YY_BREAK
57571 case 48:
57573 #line 636 "fortranscanner.l"
57574 {
57576  current->type = QCString(fortranscannerYYtext).simplifyWhiteSpace();
57577  }
57578  YY_BREAK
57579 case 49:
57581 #line 640 "fortranscanner.l"
57582 {
57583  current->type = QCString(fortranscannerYYtext).simplifyWhiteSpace();
57584  }
57585  YY_BREAK
57586 case 50:
57588 #line 643 "fortranscanner.l"
57589 {
57590  }
57591  YY_BREAK
57592 case 51:
57593 /* rule 51 can match eol */
57595 #line 645 "fortranscanner.l"
57596 {
57597  currentModifiers |= QCString(fortranscannerYYtext);
57598  }
57599  YY_BREAK
57600 case 52:
57602 #line 648 "fortranscanner.l"
57603 {
57604  }
57605  YY_BREAK
57606 case 53:
57608 #line 650 "fortranscanner.l"
57609 {
57613  current->name = name;
57617  addCurrentEntry(1);
57618  }
57619  YY_BREAK
57620 case 54:
57622 #line 660 "fortranscanner.l"
57623 { /* Specific bindings come after the ID. */
57625  }
57626  YY_BREAK
57627 case 55:
57628 /* rule 55 can match eol */
57630 #line 663 "fortranscanner.l"
57631 {
57633  newLine();
57634  docBlock.resize(0);
57635  }
57636  YY_BREAK
57637 
57638 
57639 case 56:
57640 /* rule 56 can match eol */
57642 #line 672 "fortranscanner.l"
57643 { /* end type definition */
57645  if (!endScope(current_root))
57646  yyterminate();
57647  typeMode = false;
57648  yy_pop_state();
57649  }
57650  YY_BREAK
57651 
57652 /*------- module/global/typedef variable ---------------------------------------------------*/
57653 case 57:
57654 /* rule 57 can match eol */
57656 #line 683 "fortranscanner.l"
57657 {
57658  //
57659  // ABSTRACT and specific interfaces are stored
57660  // in a scope of their own, even if multiple
57661  // are group in one INTERFACE/END INTERFACE block.
57662  //
57664  if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
57666 
57667  if (!endScope(current_root))
57668  yyterminate();
57669  subrCurrent.remove(0u);
57670  yy_pop_state() ;
57671  }
57672  YY_BREAK
57673 
57674 case 58:
57676 #line 699 "fortranscanner.l"
57677 {
57678  }
57679  YY_BREAK
57680 
57681 
57682 case 59:
57683 /* rule 59 can match eol */
57684 *yy_cp = (yy_hold_char); /* undo effects of setting up fortranscannerYYtext */
57685 (yy_c_buf_p) = yy_cp -= 1;
57686 YY_DO_BEFORE_ACTION; /* set up fortranscannerYYtext again */
57688 #line 703 "fortranscanner.l"
57689 {
57690  current->bodyLine = yyLineNr + 1;
57692  /* variable declaration starts */
57693  if(YY_START == Start)
57694  {
57695  addModule(NULL);
57696  yy_push_state(ModuleBody); //anon program
57697  }
57698  argType = QCString(fortranscannerYYtext).simplifyWhiteSpace().lower();
57700  }
57701  YY_BREAK
57702 /* Dimitri: macro expansion should already be done during preprocessing not here!
57703 ^{BS}{PP_ID}{KIND}? { // check for preprocessor symbol expand to type
57704  QCString str = fortranscannerYYtext;
57705  str = str.stripWhiteSpace();
57706  //DefineDict* defines = getGlobalDefineDict();
57707  QCString name;
57708  int index = str.find("(");
57709  if (index != -1)
57710  name = str.left(index).stripWhiteSpace();
57711  else
57712  name = str;
57713 
57714  Define *define = 0; //(*defines)[name];
57715  if (define != 0 && isTypeName(define->definition))
57716  {
57717  argType = str;
57718  yy_push_state(AttributeList);
57719  }
57720  else
57721  {
57722  yyColNr -= (int)fortranscannerYYleng;
57723  REJECT;
57724  }
57725  }
57726  */
57727 case 60:
57728 *yy_cp = (yy_hold_char); /* undo effects of setting up fortranscannerYYtext */
57729 (yy_c_buf_p) = yy_cp = yy_bp + 8;
57730 YY_DO_BEFORE_ACTION; /* set up fortranscannerYYtext again */
57732 #line 740 "fortranscanner.l"
57733 {
57734  /* external can be a "type" or an attribute */
57735  if(YY_START == Start)
57736  {
57737  addModule(NULL);
57738  yy_push_state(ModuleBody); //anon program
57739  }
57742  argType = QCString(fortranscannerYYtext).simplifyWhiteSpace().lower();
57744  }
57745  YY_BREAK
57746 case 61:
57747 /* rule 61 can match eol */
57748 #line 753 "fortranscanner.l"
57749 case 62:
57750 /* rule 62 can match eol */
57752 #line 753 "fortranscanner.l"
57753 {
57754  /* attribute statement starts */
57755  DBG_CTX((stderr,"5=========> Attribute statement: %s\n", fortranscannerYYtext));
57758  argType="";
57760  BEGIN( AttributeList ) ;
57761  }
57762  YY_BREAK
57763 case 63:
57765 #line 762 "fortranscanner.l"
57766 {
57767  }
57768  YY_BREAK
57769 case 64:
57771 #line 764 "fortranscanner.l"
57772 { }
57773  YY_BREAK
57774 case 65:
57776 #line 765 "fortranscanner.l"
57777 { }
57778  YY_BREAK
57779 
57780 
57781 case 66:
57783 #line 768 "fortranscanner.l"
57784 {}
57785  YY_BREAK
57786 case 67:
57788 #line 769 "fortranscanner.l"
57789 {}
57790  YY_BREAK
57791 case 68:
57792 /* rule 68 can match eol */
57794 #line 770 "fortranscanner.l"
57795 { /* update current modifiers when it is an ATTR_SPEC and not a variable name */
57796  /* bug_625519 */
57797  QChar chr = fortranscannerYYtext[(int)fortranscannerYYleng-1];
57798  if (chr.isLetter() || chr.isDigit() || (chr == '_'))
57799  {
57801  REJECT;
57802  }
57803  else
57804  {
57806  tmp = tmp.left(tmp.length() - 1);
57807  yyColNr -= 1;
57808  unput(fortranscannerYYtext[(int)fortranscannerYYleng-1]);
57809  currentModifiers |= (tmp);
57810  }
57811  }
57812  YY_BREAK
57813 case 69:
57815 #line 787 "fortranscanner.l"
57816 { /* end attribute list */
57817  BEGIN( Variable );
57818  }
57819  YY_BREAK
57820 case 70:
57822 #line 790 "fortranscanner.l"
57823 { /* unknown attribute, consider variable name */
57824  //cout<<"start variables, unput "<<*fortranscannerYYtext<<endl;
57825  yyColNr -= 1;
57826  unput(*fortranscannerYYtext);
57827  BEGIN( Variable );
57828  }
57829  YY_BREAK
57830 
57831 case 71:
57833 #line 798 "fortranscanner.l"
57834 { }
57835  YY_BREAK
57836 case 72:
57838 #line 799 "fortranscanner.l"
57839 { /* parse variable declaration */
57840  //cout << "5=========> got variable: " << argType << "::" << fortranscannerYYtext << endl;
57841  /* work around for bug in QCString.replace (QCString works) */
57843  name = name.lower();
57844  /* remember attributes for the symbol */
57846  argName= name;
57847 
57848  v_type= V_IGNORE;
57850  { // new variable entry
57851  v_type = V_VARIABLE;
57853  current->name = argName;
57854  current->type = argType;
57856  current->bodyLine = yyLineNr; // used for source reference
57858  addCurrentEntry(1);
57859  }
57860  else if (!argType.isEmpty())
57861  { // declaration of parameter list: add type for corr. parameter
57863  if (parameter)
57864  {
57867  if (!docBlock.isNull())
57868  {
57870  }
57871  }
57872  // save, it may be function return type
57873  if (parameter)
57874  {
57875  modifiers[current_root][name.lower()].type = argType;
57876  }
57877  else
57878  {
57879  if ((current_root->name.lower() == argName.lower()) ||
57880  (modifiers[current_root->parent()][current_root->name.lower()].returnName.lower() == argName.lower()))
57881  {
57882  int strt = current_root->type.find("function");
57883  QCString lft;
57884  QCString rght;
57885  if (strt != -1)
57886  {
57887  v_type = V_RESULT;
57888  lft = "";
57889  rght = "";
57890  if (strt != 0) lft = current_root->type.left(strt).stripWhiteSpace();
57891  if ((current_root->type.length() - strt - strlen("function"))!= 0)
57892  {
57893  rght = current_root->type.right(current_root->type.length() - strt - strlen("function")).stripWhiteSpace();
57894  }
57895  current_root->type = lft;
57896  if (rght.length() > 0)
57897  {
57898  if (current_root->type.length() > 0) current_root->type += " ";
57899  current_root->type += rght;
57900  }
57901  if (argType.stripWhiteSpace().length() > 0)
57902  {
57903  if (current_root->type.length() > 0) current_root->type += " ";
57905  }
57906  if (current_root->type.length() > 0) current_root->type += " ";
57907  current_root->type += "function";
57908  if (!docBlock.isNull())
57909  {
57911  }
57912  }
57913  else
57914  {
57916  }
57918  modifiers[current_root][name.lower()].type = current_root->type;
57919  }
57920  else
57921  {
57922  modifiers[current_root][name.lower()].type = argType;
57923  }
57924  }
57925  // any accumulated doc for argument should be emptied,
57926  // because it is handled other way and this doc can be
57927  // unexpectedly passed to the next member.
57928  current->doc.resize(0);
57929  current->brief.resize(0);
57930  }
57931  }
57932  YY_BREAK
57933 case 73:
57934 /* rule 73 can match eol */
57936 #line 892 "fortranscanner.l"
57937 { /* dimension of the previous entry. */
57939  QCString attr("dimension");
57940  attr += fortranscannerYYtext;
57941  modifiers[current_root][name.lower()] |= attr;
57942  }
57943  YY_BREAK
57944 case 74:
57946 #line 898 "fortranscanner.l"
57947 { //printf("COMMA: %d<=..<=%d\n", yyColNr-(int)fortranscannerYYleng, yyColNr);
57948  // locate !< comment
57950  }
57951  YY_BREAK
57952 case 75:
57954 #line 902 "fortranscanner.l"
57955 {
57957  initializer="=";
57960  }
57961  YY_BREAK
57962 case 76:
57963 /* rule 76 can match eol */
57965 #line 908 "fortranscanner.l"
57967  yy_pop_state(); // end variable declaration list
57968  newLine();
57969  docBlock.resize(0);
57970  }
57971  YY_BREAK
57972 case 77:
57973 /* rule 77 can match eol */
57975 #line 913 "fortranscanner.l"
57977  yy_pop_state(); // end variable declaration list
57978  docBlock.resize(0);
57979  inputStringSemi =(const char*)(QCString(" \n") + QCString(fortranscannerYYtext+1)).data();
57980  yyLineNr--;
57982  }
57983  YY_BREAK
57984 case 78:
57985 /* rule 78 can match eol */
57987 #line 920 "fortranscanner.l"
57988 {
57989  if (YY_START == Variable) REJECT; // Just be on the safe side
57990  if (YY_START == String) REJECT; // ";" ignored in strings
57991  if (YY_START == StrIgnore) REJECT; // ";" ignored in regular comments
57992  inputStringSemi =(const char*)(QCString(" \n") + QCString(fortranscannerYYtext+1)).data();
57993  yyLineNr--;
57995  }
57996  YY_BREAK
57997 case 79:
57998 #line 930 "fortranscanner.l"
57999 case 80:
58001 #line 930 "fortranscanner.l"
58004  BEGIN(ArrayInitializer); // initializer may contain comma
58005  }
58006  YY_BREAK
58007 case 81:
58008 #line 935 "fortranscanner.l"
58009 case 82:
58011 #line 935 "fortranscanner.l"
58014  if(initializerArrayScope<=0)
58015  {
58016  initializerArrayScope = 0; // just in case
58018  }
58019  }
58020  YY_BREAK
58021 case 83:
58023 #line 943 "fortranscanner.l"
58025  YY_BREAK
58026 case 84:
58028 #line 944 "fortranscanner.l"
58029 { initializerScope++;
58031  }
58032  YY_BREAK
58033 case 85:
58035 #line 947 "fortranscanner.l"
58036 { initializerScope--;
58038  }
58039  YY_BREAK
58040 case 86:
58042 #line 950 "fortranscanner.l"
58043 { if (initializerScope == 0)
58044  {
58046  yy_pop_state(); // end initialization
58048  }
58049  else
58050  initializer+=", ";
58051  }
58052  YY_BREAK
58053 case 87:
58054 /* rule 87 can match eol */
58056 #line 959 "fortranscanner.l"
58057 { //|
58058  yy_pop_state(); // end initialization
58060  yyColNr -= 1;
58061  unput(*fortranscannerYYtext);
58062  }
58063  YY_BREAK
58064 case 88:
58066 #line 965 "fortranscanner.l"
58068  YY_BREAK
58069 /*------ fortran subroutine/function handling ------------------------------------------------------------*/
58070 /* Start is initial condition */
58071 case 89:
58072 /* rule 89 can match eol */
58074 #line 970 "fortranscanner.l"
58075 {
58076  if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
58077  {
58078  addInterface("$interface$", ifType);
58080  }
58081 
58082  // TYPE_SPEC is for old function style function result
58083  result = QCString(fortranscannerYYtext).stripWhiteSpace().lower();
58084  current->type = result;
58086  }
58087  YY_BREAK
58088 case 90:
58090 #line 983 "fortranscanner.l"
58091 {
58092  // Fortran subroutine or function found
58093  v_type = V_IGNORE;
58097  BEGIN(Subprog);
58098  current->bodyLine = yyLineNr + lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account.
58100  }
58101  YY_BREAK
58102 case 91:
58104 #line 994 "fortranscanner.l"
58105 {
58106  // Fortran subroutine or function found
58107  v_type = V_IGNORE;
58108  if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
58109  {
58110  addInterface("$interface$", ifType);
58112  }
58113 
58114  result = QCString(fortranscannerYYtext).stripWhiteSpace();
58117  current->bodyLine = yyLineNr + lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account.
58119  }
58120  YY_BREAK
58121 case 92:
58123 #line 1010 "fortranscanner.l"
58124 { /* ignore white space */ }
58125  YY_BREAK
58126 case 93:
58128 #line 1011 "fortranscanner.l"
58130  //cout << "1a==========> got " << current->type << " " << fortranscannerYYtext << " " << yyLineNr << endl;
58131  modifiers[current_root][current->name.lower()].returnName = current->name.lower();
58132 
58133  if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
58134  {
58135  current_root->name.replace(QRegExp("\\$interface\\$"), fortranscannerYYtext);
58136  }
58137 
58139  }
58140  YY_BREAK
58141 case 94:
58143 #line 1022 "fortranscanner.l"
58144 { current->args = "("; }
58145  YY_BREAK
58146 case 95:
58148 #line 1023 "fortranscanner.l"
58149 {
58150  current->args += ")";
58152  addCurrentEntry(1);
58154  BEGIN(SubprogBody);
58155  }
58156  YY_BREAK
58157 case 96:
58159 #line 1030 "fortranscanner.l"
58162  if (c!=NULL) {
58163  if(current->argList->count()>0) {
58164  current->argList->at(current->argList->count()-1)->docs = c->str;
58165  }
58166  }
58167  }
58168  YY_BREAK
58169 case 97:
58171 #line 1038 "fortranscanner.l"
58172 {
58173  //current->type not yet available
58175  // std::cout << "3=========> got parameter " << param << std::endl;
58176  current->args += param;
58177  Argument *arg = new Argument;
58178  arg->name = param;
58179  arg->type = "";
58180  current->argList->append(arg);
58181  }
58182  YY_BREAK
58183 case 98:
58184 /* rule 98 can match eol */
58186 #line 1048 "fortranscanner.l"
58187 {
58188  newLine();
58189  //printf("3=========> without parameterlist \n");
58190  //current->argList = ;
58191  addCurrentEntry(1);
58193  BEGIN(SubprogBody);
58194 }
58195  YY_BREAK
58196 case 99:
58198 #line 1056 "fortranscanner.l"
58199 {
58200  if (functionLine)
58201  {
58203  result= result.right(result.length()-result.find("(")-1);
58205  modifiers[current_root->parent()][current_root->name.lower()].returnName = result;
58206  }
58207  //cout << "=====> got result " << result << endl;
58208  }
58209  YY_BREAK
58210 /*---- documentation comments --------------------------------------------------------------------*/
58211 case 100:
58213 #line 1069 "fortranscanner.l"
58214 { /* backward docu comment */
58215  if (v_type != V_IGNORE) {
58218  docBlock.resize(0);
58219  docBlockJavaStyle = Config_getBool("JAVADOC_AUTOBRIEF");
58222  }
58223  else
58224  {
58225  /* handle out of place !< comment as a normal comment */
58226  if (YY_START == String) { yyColNr -= (int)fortranscannerYYleng; REJECT; } // "!" is ignored in strings
58227  // skip comment line (without docu comments "!>" "!<" )
58228  /* ignore further "!" and ignore comments in Strings */
58229  if ((YY_START != StrIgnore) && (YY_START != String))
58230  {
58232  BEGIN(StrIgnore);
58233  debugStr="*!";
58234  //fprintf(stderr,"start comment %d\n",yyLineNr);
58235  }
58236  }
58237  }
58238  YY_BREAK
58239 case 101:
58241 #line 1093 "fortranscanner.l"
58242 { // contents of current comment line
58244  }
58245  YY_BREAK
58246 case 102:
58247 /* rule 102 can match eol */
58249 #line 1096 "fortranscanner.l"
58250 { // comment block (next line is also comment line)
58251  docBlock+="\n"; // \n is necessary for lists
58252  newLine();
58253  }
58254  YY_BREAK
58255 case 103:
58256 /* rule 103 can match eol */
58258 #line 1100 "fortranscanner.l"
58259 { // comment block ends at the end of this line
58260  //cout <<"3=========> comment block : "<< docBlock << endl;
58261  yyColNr -= 1;
58262  unput(*fortranscannerYYtext);
58263  if (v_type == V_VARIABLE)
58264  {
58265  Entry *tmp_entry = current;
58266  current = last_entry; // temporarily switch to the previous entry
58268  current=tmp_entry;
58269  }
58270  else if (v_type == V_PARAMETER)
58271  {
58273  }
58274  else if (v_type == V_RESULT)
58275  {
58277  }
58278  yy_pop_state();
58279  docBlock.resize(0);
58280  }
58281  YY_BREAK
58282 case 104:
58284 #line 1123 "fortranscanner.l"
58285 {
58290  docBlock.resize(0);
58291  docBlockJavaStyle = Config_getBool("JAVADOC_AUTOBRIEF");
58293  BEGIN(DocBlock);
58294  //cout << "start DocBlock " << endl;
58295  }
58296  YY_BREAK
58297 case 105:
58299 #line 1135 "fortranscanner.l"
58300 { // contents of current comment line
58302  }
58303  YY_BREAK
58304 case 106:
58305 /* rule 106 can match eol */
58307 #line 1138 "fortranscanner.l"
58308 { // comment block (next line is also comment line)
58309  docBlock+="\n"; // \n is necessary for lists
58310  newLine();
58311  }
58312  YY_BREAK
58313 case 107:
58314 /* rule 107 can match eol */
58316 #line 1142 "fortranscanner.l"
58317 { // comment block ends at the end of this line
58318  //cout <<"3=========> comment block : "<< docBlock << endl;
58319  yyColNr -= 1;
58320  unput(*fortranscannerYYtext);
58322  yy_pop_state();
58323  }
58324  YY_BREAK
58325 /*-----Prototype parsing -------------------------------------------------------------------------*/
58326 case 108:
58328 #line 1151 "fortranscanner.l"
58329 {
58331  }
58332  YY_BREAK
58333 case 109:
58335 #line 1154 "fortranscanner.l"
58336 {
58337  current->name = QCString(fortranscannerYYtext).lower();
58340  }
58341  YY_BREAK
58342 
58343 case 110:
58345 #line 1160 "fortranscanner.l"
58347  YY_BREAK
58348 case 111:
58350 #line 1161 "fortranscanner.l"
58352  Argument *a = new Argument;
58353  a->name = QCString(fortranscannerYYtext).lower();
58354  current->argList->append(a);
58355  }
58356  YY_BREAK
58357 
58358 /*------------------------------------------------------------------------------------------------*/
58359 case 112:
58360 /* rule 112 can match eol */
58362 #line 1170 "fortranscanner.l"
58363 {
58364  newLine();
58365  //if (debugStr.stripWhiteSpace().length() > 0) cout << "ignored text: " << debugStr << " state: " <<YY_START << endl;
58366  debugStr="";
58367  }
58368  YY_BREAK
58369 /*---- error: EOF in wrong state --------------------------------------------------------------------*/
58370 case YY_STATE_EOF(INITIAL):
58371 case YY_STATE_EOF(Subprog):
58372 case YY_STATE_EOF(SubprogPrefix):
58373 case YY_STATE_EOF(Parameterlist):
58374 case YY_STATE_EOF(SubprogBody):
58375 case YY_STATE_EOF(SubprogBodyContains):
58376 case YY_STATE_EOF(Start):
58377 case YY_STATE_EOF(Comment):
58378 case YY_STATE_EOF(Module):
58379 case YY_STATE_EOF(Program):
58380 case YY_STATE_EOF(ModuleBody):
58381 case YY_STATE_EOF(ModuleBodyContains):
58382 case YY_STATE_EOF(AttributeList):
58383 case YY_STATE_EOF(Variable):
58384 case YY_STATE_EOF(Initialization):
58385 case YY_STATE_EOF(ArrayInitializer):
58386 case YY_STATE_EOF(Typedef):
58387 case YY_STATE_EOF(TypedefBody):
58388 case YY_STATE_EOF(TypedefBodyContains):
58389 case YY_STATE_EOF(InterfaceBody):
58390 case YY_STATE_EOF(StrIgnore):
58391 case YY_STATE_EOF(String):
58392 case YY_STATE_EOF(Use):
58393 case YY_STATE_EOF(UseOnly):
58394 case YY_STATE_EOF(ModuleProcedure):
58395 case YY_STATE_EOF(Prepass):
58396 case YY_STATE_EOF(DocBlock):
58397 case YY_STATE_EOF(DocBackLine):
58398 case YY_STATE_EOF(EndDoc):
58399 case YY_STATE_EOF(BlockData):
58400 case YY_STATE_EOF(Prototype):
58401 case YY_STATE_EOF(PrototypeSubprog):
58402 case YY_STATE_EOF(PrototypeArgs):
58403 #line 1179 "fortranscanner.l"
58404 {
58405  if (parsingPrototype) {
58406  yyterminate();
58407 
58408  } else if ( include_stack_ptr <= 0 ) {
58409  if (YY_START!=INITIAL && YY_START!=Start) {
58410  DBG_CTX((stderr,"==== Error: EOF reached in wrong state (end missing)"));
58411  scanner_abort();
58412  }
58413  yyterminate();
58414  } else {
58415  popBuffer();
58416  }
58417  }
58418  YY_BREAK
58419 case 113:
58421 #line 1193 "fortranscanner.l"
58422 { // Fortran logical comparison keywords
58423  }
58424  YY_BREAK
58425 case 114:
58427 #line 1195 "fortranscanner.l"
58428 {
58429  //debugStr+=fortranscannerYYtext;
58430  //printf("I:%c\n", *fortranscannerYYtext);
58431  } // ignore remaining text
58432  YY_BREAK
58433 /**********************************************************************************/
58434 /**********************************************************************************/
58435 /**********************************************************************************/
58436 case 115:
58438 #line 1203 "fortranscanner.l"
58439 ECHO;
58440  YY_BREAK
58441 #line 58442 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/fortranscanner.cpp"
58442 
58443  case YY_END_OF_BUFFER:
58444  {
58445  /* Amount of text matched not including the EOB char. */
58446  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
58447 
58448  /* Undo the effects of YY_DO_BEFORE_ACTION. */
58449  *yy_cp = (yy_hold_char);
58451 
58452  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
58453  {
58454  /* We're scanning a new file or input source. It's
58455  * possible that this happened because the user
58456  * just pointed fortranscannerYYin at a new source and called
58457  * fortranscannerYYlex(). If so, then we have to assure
58458  * consistency between YY_CURRENT_BUFFER and our
58459  * globals. Here is the right place to do so, because
58460  * this is the first action (other than possibly a
58461  * back-up) that will match for the new input source.
58462  */
58463  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
58465  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
58466  }
58467 
58468  /* Note that here we test for yy_c_buf_p "<=" to the position
58469  * of the first EOB in the buffer, since yy_c_buf_p will
58470  * already have been incremented past the NUL character
58471  * (since all states make transitions on EOB to the
58472  * end-of-buffer state). Contrast this with the test
58473  * in input().
58474  */
58475  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
58476  { /* This was really a NUL. */
58477  yy_state_type yy_next_state;
58478 
58479  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
58480 
58481  yy_current_state = yy_get_previous_state( );
58482 
58483  /* Okay, we're now positioned to make the NUL
58484  * transition. We couldn't have
58485  * yy_get_previous_state() go ahead and do it
58486  * for us because it doesn't know how to deal
58487  * with the possibility of jamming (and we don't
58488  * want to build jamming into it because then it
58489  * will run more slowly).
58490  */
58491 
58492  yy_next_state = yy_try_NUL_trans( yy_current_state );
58493 
58495 
58496  if ( yy_next_state )
58497  {
58498  /* Consume the NUL. */
58499  yy_cp = ++(yy_c_buf_p);
58500  yy_current_state = yy_next_state;
58501  goto yy_match;
58502  }
58503 
58504  else
58505  {
58506  yy_cp = (yy_c_buf_p);
58507  goto yy_find_action;
58508  }
58509  }
58510 
58511  else switch ( yy_get_next_buffer( ) )
58512  {
58513  case EOB_ACT_END_OF_FILE:
58514  {
58516 
58517  if ( fortranscannerYYwrap( ) )
58518  {
58519  /* Note: because we've taken care in
58520  * yy_get_next_buffer() to have set up
58521  * fortranscannerYYtext, we can now set up
58522  * yy_c_buf_p so that if some total
58523  * hoser (like flex itself) wants to
58524  * call the scanner after we return the
58525  * YY_NULL, it'll still work - another
58526  * YY_NULL will get returned.
58527  */
58529 
58531  goto do_action;
58532  }
58533 
58534  else
58535  {
58536  if ( ! (yy_did_buffer_switch_on_eof) )
58537  YY_NEW_FILE;
58538  }
58539  break;
58540  }
58541 
58542  case EOB_ACT_CONTINUE_SCAN:
58543  (yy_c_buf_p) =
58544  (yytext_ptr) + yy_amount_of_matched_text;
58545 
58546  yy_current_state = yy_get_previous_state( );
58547 
58548  yy_cp = (yy_c_buf_p);
58550  goto yy_match;
58551 
58552  case EOB_ACT_LAST_MATCH:
58553  (yy_c_buf_p) =
58554  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
58555 
58556  yy_current_state = yy_get_previous_state( );
58557 
58558  yy_cp = (yy_c_buf_p);
58560  goto yy_find_action;
58561  }
58562  break;
58563  }
58564 
58565  default:
58567  "fatal flex scanner internal error--no action found" );
58568  } /* end of action switch */
58569  } /* end of scanning one token */
static QCString name
Definition: declinfo.cpp:673
#define Prototype
static char * yy_full_match
QCString type
Definition: arguments.h:67
bool resize(uint newlen)
Definition: qcstring.h:225
#define yyterminate()
#define YY_CURRENT_BUFFER_LVALUE
static int * yy_full_state
register char * yy_bp
static int yy_start
static QMap< Entry *, QMap< QCString, SymbolModifiers > > modifiers
Holds program scope->symbol name->symbol modifiers.
#define AttributeList
#define String
static InterfaceType ifType
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
static yyconst flex_int16_t yy_nxt[209459]
uint64 spec
class/member specifiers
Definition: entry.h:243
static int yy_did_buffer_switch_on_eof
static int yy_top_state(void)
static int yy_get_next_buffer(void)
static bool docBlockInBody
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
static Protection typeProtection
static QCString inputStringPrepass
Input string for prepass of line cont. &#39;&&#39;.
static int yyLineNr
static void updateVariablePrepassComment(int from, int to)
#define YY_NEW_FILE
uint length() const
Definition: qcstring.h:195
static yy_state_type * yy_state_buf
static yyconst flex_int16_t yy_def[29670]
void append(const type *d)
Definition: qlist.h:73
static void addCurrentEntry(int case_insens)
#define BEGIN
Definition: entry.h:63
static void resolveModuleProcedures(QList< Entry > &moduleProcedures, Entry *current_root)
Definition: types.h:26
static Protection defaultProtection
static SymbolModifiers currentModifiers
Accumulated modifiers of current statement, eg variable declaration.
#define Program
#define SubprogBody
static void startCommentBlock(bool)
FILE * fortranscannerYYin
static Entry * current
static yyconst flex_int16_t yy_chk[209459]
#define ArrayInitializer
bool isLetter() const
Definition: qstring.cpp:11035
int docLine
line number at which the documentation was found
Definition: entry.h:261
static void newLine()
const bool FALSE
Definition: qglobal.h:370
#define EndDoc
Definition: types.h:26
ArgumentList * argList
member arguments as a list
Definition: entry.h:254
static char yy_hold_char
void addSubEntry(Entry *e)
Definition: entry.cpp:206
#define YY_TRAILING_MASK
#define DBG_CTX(x)
static bool functionLine
QCString name
member name
Definition: entry.h:237
static CommentInPrepass * locatePrepassComment(int from, int to)
static bool endScope(Entry *scope, bool isGlobalRoot=FALSE)
static QCString initializer
type * at(uint i) const
Definition: qlist.h:94
static void subrHandleCommentBlockResult(const QCString &doc, bool brief)
Handle result description as defined after the declaration of the parameter.
#define YY_BUFFER_NEW
QCString left(uint len) const
Definition: qcstring.cpp:213
static void addModule(const char *name, bool isModule=FALSE)
static yyconst flex_int32_t yy_meta[72]
static yyconst flex_int32_t yy_ec[256]
#define INITIAL
static bool parsingPrototype
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
#define YY_SC_TO_UI(c)
#define YY_DO_BEFORE_ACTION
#define TypedefBody
The QChar class provides a light-weight Unicode character.
Definition: qstring.h:56
#define ECHO
#define StrIgnore
int yy_state_type
Definition: code.cpp:361
Entry * parent() const
Definition: entry.h:205
static char stringStartSymbol
Definition: types.h:29
static QCString docBlock
#define Parameterlist
static Argument * parameter
static char * yy_c_buf_p
static void handleCommentBlock(const QCString &doc, bool brief)
#define YY_RULE_SETUP
#define SubprogBodyContains
#define Variable
#define ModuleBodyContains
#define UseOnly
register char * yy_cp
static Entry * current_root
static QList< CommentInPrepass > comments
#define YY_TRAILING_HEAD_MASK
static int initializerArrayScope
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
static const uint64 Final
Definition: entry.h:150
uint count() const
Definition: qlist.h:66
bool isNull() const
Definition: qcstring.h:183
static int yy_looking_for_trail_begin
static Argument * getParameter(const QCString &name)
static void addInterface(QCString name, InterfaceType type)
static QCString argType
QGString initializer
initial value (for variables)
Definition: entry.h:257
QCString brief
brief description (doc block)
Definition: entry.h:263
int endBodyLine
line number where the definition ends
Definition: entry.h:277
static Entry * last_entry
#define Module
QCString right(uint len) const
Definition: qcstring.cpp:231
#define ModuleProcedure
const double a
static QCString argName
#define YY_RESTORE_YY_MORE_OFFSET
int startLine
start line of entry in the source
Definition: entry.h:283
QCString args
member argument string
Definition: entry.h:252
static void scanner_abort()
static yy_state_type yy_get_previous_state(void)
#define YY_MORE_ADJ
const char * data() const
Definition: qcstring.h:207
if(!(yy_init))
static int yy_lp
#define TypedefBodyContains
string tmp
Definition: languages.py:63
Protection protection
class protection
Definition: entry.h:241
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
static ScanVar v_type
#define Config_getBool(val)
Definition: config.cpp:664
static void yy_pop_state(void)
#define PrototypeArgs
unsigned char YY_CHAR
Definition: code.cpp:357
#define Use
int fortranscannerYYleng
#define YY_BREAK
static int yy_full_lp
static int getAmpersandAtTheStart(const char *buf, int length)
static int yyColNr
static void startScope(Entry *scope)
register int yy_act
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:1655
static int yy_n_chars
#define fortranscannerYYwrap(n)
#define Comment
QCString doc
documentation block (partly parsed)
Definition: entry.h:260
static void truncatePrepass(int index)
static int typeMode
static void addSubprogram(const char *text)
static void popBuffer()
bool isDigit() const
Definition: qstring.cpp:11066
char * fortranscannerYYtext
static yyconst flex_int32_t yy_base[29670]
static const uint64 AbstractClass
Definition: entry.h:132
static void yy_push_state(int new_state)
#define REJECT
#define yytext_ptr
static yyconst flex_int16_t yy_acclist[6178]
static bool docBlockJavaStyle
#define YY_START
Holds modifiers (ie attributes) for one symbol (variable, function, etc)
static QList< Entry > subrCurrent
int include_stack_ptr
#define ModuleBody
static QList< Entry > moduleProcedures
QCString name
Definition: arguments.h:69
#define EOB_ACT_CONTINUE_SCAN
void line(double t, double *p, double &x, double &y, double &z)
#define BlockData
QCString fileName
file this entry was extracted from
Definition: entry.h:282
static int initializerScope
#define YY_STATE_EOF(state)
static QCString useModuleName
#define PrototypeSubprog
static yy_state_type * yy_state_ptr
#define DocBlock
#define Subprog
#define YY_BUFFER_NORMAL
static QCString yyFileName
#define Initialization
static QCString inputStringSemi
Input string after command separetor &#39;;&#39;.
static const uint64 Struct
Definition: entry.h:126
QCString lower() const
Definition: qcstring.cpp:263
SrcLangExt lang
programming language in which this entry was found
Definition: entry.h:286
#define Typedef
#define unput(c)
static int lineCountPrepass
#define YY_FATAL_ERROR(msg)
bool remove(uint i)
Definition: qlist.h:76
Definition: entry.h:37
#define SubprogPrefix
#define InterfaceBody
static int getAmpOrExclAtTheEnd(const char *buf, int length)
#define EOB_ACT_END_OF_FILE
static QCString debugStr
#define Start
QCString & replace(uint index, uint len, const char *s)
Definition: qcstring.cpp:411
static yyconst flex_int16_t yy_accept[24249]
const bool TRUE
Definition: qglobal.h:371
QList< BaseInfo > * extends
list of base classes
Definition: entry.h:279
QCString simplifyWhiteSpace() const
Definition: qcstring.cpp:323
static void subrHandleCommentBlock(const QCString &doc, bool brief)
Handle parameter description as defined after the declaration of the parameter.
#define Prepass
QCString type
member type
Definition: entry.h:236
#define DocBackLine
#define YY_END_OF_BUFFER
int section
entry type (see Sections);
Definition: entry.h:235
static QCString extractFromParens(const QCString name)
#define YY_AT_BOL()
int bodyLine
line number of the definition in the source
Definition: entry.h:276
#define EOB_ACT_LAST_MATCH
static void pushBuffer(QCString &buffer)
static void yy_fatal_error ( yyconst char  msg[])
static
static void yy_fatal_error ( yyconst char *  msg)
static

Definition at line 59238 of file fortranscanner.cpp.

59239 {
59240  (void) fprintf( stderr, "%s\n", msg );
59241  exit( YY_EXIT_FAILURE );
59242 }
void msg(const char *fmt,...)
Definition: message.cpp:107
#define YY_EXIT_FAILURE
static int yy_get_next_buffer ( void  )
static

Definition at line 58579 of file fortranscanner.cpp.

58580 {
58581  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
58582  register char *source = (yytext_ptr);
58583  register int number_to_move, i;
58584  int ret_val;
58585 
58586  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
58588  "fatal flex scanner internal error--end of buffer missed" );
58589 
58590  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
58591  { /* Don't try to fill the buffer, so this is an EOF. */
58592  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
58593  {
58594  /* We matched a single character, the EOB, so
58595  * treat this as a final EOF.
58596  */
58597  return EOB_ACT_END_OF_FILE;
58598  }
58599 
58600  else
58601  {
58602  /* We matched some text prior to the EOB, first
58603  * process it.
58604  */
58605  return EOB_ACT_LAST_MATCH;
58606  }
58607  }
58608 
58609  /* Try to read more data. */
58610 
58611  /* First move last chars to start of buffer. */
58612  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
58613 
58614  for ( i = 0; i < number_to_move; ++i )
58615  *(dest++) = *(source++);
58616 
58617  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
58618  /* don't do the read, it's not guaranteed to return an EOF,
58619  * just force an EOF
58620  */
58621  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
58622 
58623  else
58624  {
58625  int num_to_read =
58626  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
58627 
58628  while ( num_to_read <= 0 )
58629  { /* Not enough room in the buffer - grow it. */
58630 
58632 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
58633 
58634  }
58635 
58636  if ( num_to_read > YY_READ_BUF_SIZE )
58637  num_to_read = YY_READ_BUF_SIZE;
58638 
58639  /* Read in more data. */
58640  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
58641  (yy_n_chars), (size_t) num_to_read );
58642 
58643  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
58644  }
58645 
58646  if ( (yy_n_chars) == 0 )
58647  {
58648  if ( number_to_move == YY_MORE_ADJ )
58649  {
58650  ret_val = EOB_ACT_END_OF_FILE;
58652  }
58653 
58654  else
58655  {
58656  ret_val = EOB_ACT_LAST_MATCH;
58657  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
58659  }
58660  }
58661 
58662  else
58663  ret_val = EOB_ACT_CONTINUE_SCAN;
58664 
58665  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
58666  /* Extend the array by 50%, plus the number we really need. */
58667  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
58668  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) fortranscannerYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
58669  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
58670  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
58671  }
58672 
58673  (yy_n_chars) += number_to_move;
58676 
58677  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
58678 
58679  return ret_val;
58680 }
#define YY_END_OF_BUFFER_CHAR
#define YY_CURRENT_BUFFER_LVALUE
FILE * fortranscannerYYin
void fortranscannerYYrestart(FILE *input_file)
static char * yy_c_buf_p
void * fortranscannerYYrealloc(void *, yy_size_t)
#define YY_MORE_ADJ
#define YY_READ_BUF_SIZE
static int yy_n_chars
#define YY_BUFFER_EOF_PENDING
#define yytext_ptr
#define EOB_ACT_CONTINUE_SCAN
#define YY_FATAL_ERROR(msg)
#define EOB_ACT_END_OF_FILE
size_t yy_size_t
Definition: code.cpp:203
#define YY_INPUT(buf, result, max_size)
#define EOB_ACT_LAST_MATCH
static yy_state_type yy_get_previous_state ( void  )
static

Definition at line 58684 of file fortranscanner.cpp.

58685 {
58686  register yy_state_type yy_current_state;
58687  register char *yy_cp;
58688 
58689  yy_current_state = (yy_start);
58690  yy_current_state += YY_AT_BOL();
58691 
58692  (yy_state_ptr) = (yy_state_buf);
58693  *(yy_state_ptr)++ = yy_current_state;
58694 
58695  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
58696  {
58697  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
58698  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
58699  {
58700  yy_current_state = (int) yy_def[yy_current_state];
58701  if ( yy_current_state >= 24248 )
58702  yy_c = yy_meta[(unsigned int) yy_c];
58703  }
58704  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
58705  *(yy_state_ptr)++ = yy_current_state;
58706  }
58707 
58708  return yy_current_state;
58709 }
static int yy_start
static yyconst flex_int16_t yy_nxt[209459]
static yy_state_type * yy_state_buf
static yyconst flex_int16_t yy_def[29670]
static yyconst flex_int16_t yy_chk[209459]
static yyconst flex_int32_t yy_meta[72]
static yyconst flex_int32_t yy_ec[256]
#define YY_SC_TO_UI(c)
int yy_state_type
Definition: code.cpp:361
static char * yy_c_buf_p
register char * yy_cp
#define YY_MORE_ADJ
unsigned char YY_CHAR
Definition: code.cpp:357
static yyconst flex_int32_t yy_base[29670]
#define yytext_ptr
static yy_state_type * yy_state_ptr
#define YY_AT_BOL()
static int yy_init_globals ( void  )
static

Definition at line 59341 of file fortranscanner.cpp.

59342 {
59343  /* Initialization is the same as for the non-reentrant scanner.
59344  * This function is called from fortranscannerYYlex_destroy(), so don't allocate here.
59345  */
59346 
59347  (yy_buffer_stack) = 0;
59348  (yy_buffer_stack_top) = 0;
59349  (yy_buffer_stack_max) = 0;
59350  (yy_c_buf_p) = (char *) 0;
59351  (yy_init) = 0;
59352  (yy_start) = 0;
59353 
59354  (yy_start_stack_ptr) = 0;
59355  (yy_start_stack_depth) = 0;
59356  (yy_start_stack) = NULL;
59357 
59358  (yy_state_buf) = 0;
59359  (yy_state_ptr) = 0;
59360  (yy_full_match) = 0;
59361  (yy_lp) = 0;
59362 
59363 /* Defined in main.c */
59364 #ifdef YY_STDINIT
59365  fortranscannerYYin = stdin;
59367 #else
59368  fortranscannerYYin = (FILE *) 0;
59369  fortranscannerYYout = (FILE *) 0;
59370 #endif
59371 
59372  /* For future reference: Set errno on error, since we are called by
59373  * fortranscannerYYlex_init()
59374  */
59375  return 0;
59376 }
static char * yy_full_match
static int * yy_start_stack
static int yy_start
static yy_state_type * yy_state_buf
static int yy_start_stack_depth
FILE * fortranscannerYYin
static char * yy_c_buf_p
static size_t yy_buffer_stack_top
static int yy_init
static int yy_lp
FILE * fortranscannerYYout
static size_t yy_buffer_stack_max
static YY_BUFFER_STATE * yy_buffer_stack
static yy_state_type * yy_state_ptr
static int yy_start_stack_ptr
static void yy_pop_state ( void  )
static

Definition at line 59221 of file fortranscanner.cpp.

59222 {
59223  if ( --(yy_start_stack_ptr) < 0 )
59224  YY_FATAL_ERROR( "start-condition stack underflow" );
59225 
59227 }
static int * yy_start_stack
#define BEGIN
static int yy_start_stack_ptr
#define YY_FATAL_ERROR(msg)
static void yy_push_state ( int  new_state)
static

Definition at line 59197 of file fortranscanner.cpp.

59198 {
59200  {
59201  yy_size_t new_size;
59202 
59204  new_size = (yy_start_stack_depth) * sizeof( int );
59205 
59206  if ( ! (yy_start_stack) )
59207  (yy_start_stack) = (int *) fortranscannerYYalloc(new_size );
59208 
59209  else
59210  (yy_start_stack) = (int *) fortranscannerYYrealloc((void *) (yy_start_stack),new_size );
59211 
59212  if ( ! (yy_start_stack) )
59213  YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
59214  }
59215 
59217 
59218  BEGIN(new_state);
59219 }
static int * yy_start_stack
static int yy_start_stack_depth
#define BEGIN
void * fortranscannerYYrealloc(void *, yy_size_t)
#define YY_START
#define YY_START_STACK_INCR
static int yy_start_stack_ptr
void * fortranscannerYYalloc(yy_size_t)
#define YY_FATAL_ERROR(msg)
size_t yy_size_t
Definition: code.cpp:203
static int yy_top_state ( void  )
static

Definition at line 59229 of file fortranscanner.cpp.

59230 {
59231  return (yy_start_stack)[(yy_start_stack_ptr) - 1];
59232 }
static int * yy_start_stack
static int yy_start_stack_ptr
static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state)
static

Definition at line 58716 of file fortranscanner.cpp.

58717 {
58718  register int yy_is_jam;
58719 
58720  register YY_CHAR yy_c = 1;
58721  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
58722  {
58723  yy_current_state = (int) yy_def[yy_current_state];
58724  if ( yy_current_state >= 24248 )
58725  yy_c = yy_meta[(unsigned int) yy_c];
58726  }
58727  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
58728  yy_is_jam = (yy_current_state == 24247);
58729  if ( ! yy_is_jam )
58730  *(yy_state_ptr)++ = yy_current_state;
58731 
58732  return yy_is_jam ? 0 : yy_current_state;
58733 }
static yyconst flex_int16_t yy_nxt[209459]
static yyconst flex_int16_t yy_def[29670]
static yyconst flex_int16_t yy_chk[209459]
static yyconst flex_int32_t yy_meta[72]
unsigned char YY_CHAR
Definition: code.cpp:357
static yyconst flex_int32_t yy_base[29670]
static yy_state_type * yy_state_ptr
static int yyread ( char *  buf,
int  max_size 
)
static

Definition at line 60319 of file fortranscanner.cpp.

60320 {
60321  int c=0;
60322 
60323  while ( c < max_size && inputString[inputPosition] )
60324  {
60325  *buf = inputString[inputPosition++] ;
60326  c++; buf++;
60327  }
60328  return c;
60329 }
static const char * inputString
static int inputPosition
static void yyunput ( int  c,
char *  buf_ptr 
)
static
static void yyunput ( int  c,
register char *  yy_bp 
)
static

Definition at line 58735 of file fortranscanner.cpp.

58736 {
58737  register char *yy_cp;
58738 
58739  yy_cp = (yy_c_buf_p);
58740 
58741  /* undo effects of setting up fortranscannerYYtext */
58742  *yy_cp = (yy_hold_char);
58743 
58744  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
58745  { /* need to shift things up to make room */
58746  /* +2 for EOB chars. */
58747  register int number_to_move = (yy_n_chars) + 2;
58748  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
58749  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
58750  register char *source =
58751  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
58752 
58753  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
58754  *--dest = *--source;
58755 
58756  yy_cp += (int) (dest - source);
58757  yy_bp += (int) (dest - source);
58758  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
58759  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
58760 
58761  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
58762  YY_FATAL_ERROR( "flex scanner push-back overflow" );
58763  }
58764 
58765  *--yy_cp = (char) c;
58766 
58767  (yytext_ptr) = yy_bp;
58768  (yy_hold_char) = *yy_cp;
58769  (yy_c_buf_p) = yy_cp;
58770 }
#define YY_CURRENT_BUFFER_LVALUE
register char * yy_bp
static char yy_hold_char
static char * yy_c_buf_p
register char * yy_cp
if(!(yy_init))
static int yy_n_chars
#define yytext_ptr
#define YY_FATAL_ERROR(msg)

Variable Documentation

QCString argName
static

Definition at line 56617 of file fortranscanner.cpp.

QCString argType
static

Definition at line 56616 of file fortranscanner.cpp.

QList<CommentInPrepass> comments
static

Definition at line 56587 of file fortranscanner.cpp.

Entry* current = 0
static

Definition at line 56600 of file fortranscanner.cpp.

Entry* current_root = 0
static

Definition at line 56597 of file fortranscanner.cpp.

SymbolModifiers currentModifiers
static

Accumulated modifiers of current statement, eg variable declaration.

Definition at line 56632 of file fortranscanner.cpp.

QCString debugStr
static

Definition at line 56613 of file fortranscanner.cpp.

Protection defaultProtection
static

Definition at line 56622 of file fortranscanner.cpp.

const char* directionParam[]
static
Initial value:
=
{
"", "[in]", "[out]", "[in,out]"
}

Definition at line 56560 of file fortranscanner.cpp.

const char* directionStrs[]
static
Initial value:
=
{
"", "intent(in)", "intent(out)", "intent(inout)"
}

Definition at line 56556 of file fortranscanner.cpp.

QCString docBlock
static

Definition at line 56605 of file fortranscanner.cpp.

bool docBlockInBody = FALSE
static

Definition at line 56606 of file fortranscanner.cpp.

bool docBlockJavaStyle
static

Definition at line 56607 of file fortranscanner.cpp.

Entry* file_root = 0
static

Definition at line 56599 of file fortranscanner.cpp.

int fortranscannerYY_flex_debug = 0

Definition at line 56415 of file fortranscanner.cpp.

FILE * fortranscannerYYin = (FILE *) 0

Definition at line 359 of file fortranscanner.cpp.

int fortranscannerYYleng

Definition at line 294 of file fortranscanner.cpp.

int fortranscannerYYlineno = 1

Definition at line 365 of file fortranscanner.cpp.

FILE * fortranscannerYYout = (FILE *) 0

Definition at line 359 of file fortranscanner.cpp.

char * fortranscannerYYtext

Definition at line 56439 of file fortranscanner.cpp.

bool functionLine = FALSE
static

Definition at line 56626 of file fortranscanner.cpp.

ParserInterface* g_thisParser
static

Definition at line 56571 of file fortranscanner.cpp.

Entry* global_root = 0
static

Definition at line 56598 of file fortranscanner.cpp.

bool gstat
static

Definition at line 56610 of file fortranscanner.cpp.

InterfaceType ifType = IF_NONE
static

Definition at line 56625 of file fortranscanner.cpp.

YY_BUFFER_STATE* include_stack = NULL

Definition at line 56589 of file fortranscanner.cpp.

int include_stack_cnt = 0

Definition at line 56591 of file fortranscanner.cpp.

int include_stack_ptr = 0

Definition at line 56590 of file fortranscanner.cpp.

QCString initializer
static

Definition at line 56618 of file fortranscanner.cpp.

int initializerArrayScope
static

Definition at line 56619 of file fortranscanner.cpp.

int initializerScope
static

Definition at line 56620 of file fortranscanner.cpp.

QFile inputFile
static

Definition at line 56593 of file fortranscanner.cpp.

int inputPosition
static

Definition at line 56573 of file fortranscanner.cpp.

unsigned int inputPositionPrepass
static

Definition at line 56577 of file fortranscanner.cpp.

const char* inputString
static

Definition at line 56572 of file fortranscanner.cpp.

QCString inputStringPrepass
static

Input string for prepass of line cont. '&'.

Definition at line 56575 of file fortranscanner.cpp.

QCString inputStringSemi
static

Input string after command separetor ';'.

Definition at line 56576 of file fortranscanner.cpp.

bool isFixedForm
static

Definition at line 56574 of file fortranscanner.cpp.

Entry* last_entry = 0
static

Definition at line 56601 of file fortranscanner.cpp.

int lineCountPrepass = 0
static

Definition at line 56578 of file fortranscanner.cpp.

QMap<Entry*,QMap<QCString,SymbolModifiers> > modifiers
static

Holds program scope->symbol name->symbol modifiers.

Definition at line 56634 of file fortranscanner.cpp.

QList<Entry> moduleProcedures
static

Definition at line 56603 of file fortranscanner.cpp.

MethodTypes mtype
static

Definition at line 56609 of file fortranscanner.cpp.

Argument* parameter
static

Definition at line 56615 of file fortranscanner.cpp.

bool parsingPrototype = FALSE
static

Definition at line 56629 of file fortranscanner.cpp.

QCString result
static

Definition at line 56614 of file fortranscanner.cpp.

char stringStartSymbol
static

Definition at line 56628 of file fortranscanner.cpp.

QList<Entry> subrCurrent
static

Definition at line 56580 of file fortranscanner.cpp.

int typeMode = false
static

Definition at line 56624 of file fortranscanner.cpp.

Protection typeProtection
static

Definition at line 56623 of file fortranscanner.cpp.

QCString useModuleName
static

Definition at line 56621 of file fortranscanner.cpp.

ScanVar v_type = V_IGNORE
static

Definition at line 56602 of file fortranscanner.cpp.

Specifier virt
static

Definition at line 56611 of file fortranscanner.cpp.

yyconst flex_int16_t yy_accept[24249]
static

Definition at line 1077 of file fortranscanner.cpp.

yyconst flex_int16_t yy_acclist[6178]
static

Definition at line 394 of file fortranscanner.cpp.

register int yy_act

Definition at line 56936 of file fortranscanner.cpp.

yyconst flex_int32_t yy_base[29670]
static

Definition at line 3792 of file fortranscanner.cpp.

register char * yy_bp

Definition at line 56935 of file fortranscanner.cpp.

YY_BUFFER_STATE* yy_buffer_stack = 0
static

Stack as an array.

Definition at line 274 of file fortranscanner.cpp.

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 273 of file fortranscanner.cpp.

size_t yy_buffer_stack_top = 0
static

index of top of stack.

Definition at line 272 of file fortranscanner.cpp.

char* yy_c_buf_p = (char *) 0
static

Definition at line 297 of file fortranscanner.cpp.

yyconst flex_int16_t yy_chk[209459]
static

Definition at line 33370 of file fortranscanner.cpp.

register char* yy_cp

Definition at line 56935 of file fortranscanner.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 56933 of file fortranscanner.cpp.

yyconst flex_int16_t yy_def[29670]
static

Definition at line 7059 of file fortranscanner.cpp.

int yy_did_buffer_switch_on_eof
static

Definition at line 304 of file fortranscanner.cpp.

yyconst flex_int32_t yy_ec[256]
static

Definition at line 3748 of file fortranscanner.cpp.

int yy_full_lp
static

Definition at line 56421 of file fortranscanner.cpp.

char* yy_full_match
static

Definition at line 56418 of file fortranscanner.cpp.

int* yy_full_state
static

Definition at line 56422 of file fortranscanner.cpp.

char yy_hold_char
static

Definition at line 292 of file fortranscanner.cpp.

int yy_init = 0
static

Definition at line 298 of file fortranscanner.cpp.

int yy_looking_for_trail_begin = 0
static

Definition at line 56420 of file fortranscanner.cpp.

int yy_lp
static

Definition at line 56419 of file fortranscanner.cpp.

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

Definition at line 3780 of file fortranscanner.cpp.

int yy_n_chars
static

Definition at line 293 of file fortranscanner.cpp.

yyconst flex_int16_t yy_nxt[209459]
static

Definition at line 10326 of file fortranscanner.cpp.

int yy_start = 0
static

Definition at line 299 of file fortranscanner.cpp.

int* yy_start_stack = NULL
static

Definition at line 56824 of file fortranscanner.cpp.

int yy_start_stack_depth = 0
static

Definition at line 56823 of file fortranscanner.cpp.

int yy_start_stack_ptr = 0
static

Definition at line 56822 of file fortranscanner.cpp.

yy_state_type* yy_state_buf =0
static

Definition at line 56417 of file fortranscanner.cpp.

yy_state_type * yy_state_ptr =0
static

Definition at line 56417 of file fortranscanner.cpp.

int yyColNr = 0
static

Definition at line 56596 of file fortranscanner.cpp.

QCString yyFileName
static

Definition at line 56594 of file fortranscanner.cpp.

int yyLineNr = 1
static

Definition at line 56595 of file fortranscanner.cpp.