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

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 
class  UseEntry
 
class  UseSDict
 
class  Scope
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   fortrancodeYY_create_buffer
 
#define yy_delete_buffer   fortrancodeYY_delete_buffer
 
#define yy_flex_debug   fortrancodeYY_flex_debug
 
#define yy_init_buffer   fortrancodeYY_init_buffer
 
#define yy_flush_buffer   fortrancodeYY_flush_buffer
 
#define yy_load_buffer_state   fortrancodeYY_load_buffer_state
 
#define yy_switch_to_buffer   fortrancodeYY_switch_to_buffer
 
#define yyin   fortrancodeYYin
 
#define yyleng   fortrancodeYYleng
 
#define yylex   fortrancodeYYlex
 
#define yylineno   fortrancodeYYlineno
 
#define yyout   fortrancodeYYout
 
#define yyrestart   fortrancodeYYrestart
 
#define yytext   fortrancodeYYtext
 
#define yywrap   fortrancodeYYwrap
 
#define yyalloc   fortrancodeYYalloc
 
#define yyrealloc   fortrancodeYYrealloc
 
#define yyfree   fortrancodeYYfree
 
#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   fortrancodeYYrestart(fortrancodeYYin )
 
#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   fortrancodeYY_flush_buffer(YY_CURRENT_BUFFER )
 
#define yy_new_buffer   fortrancodeYY_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 fortrancodeYYwrap(n)   1
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   fortrancodeYYtext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   66
 
#define YY_END_OF_BUFFER   67
 
#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_TOP_STATE   1
 
#define YY_NO_INPUT   1
 
#define YY_NO_UNISTD_H   1
 
#define YY_USER_ACTION   {yy_old_start = yy_my_start; yy_my_start = yy_end; yy_end += fortrancodeYYleng;}
 
#define YY_FTN_RESET   {yy_old_start = 0; yy_my_start = 0; yy_end = 1;}
 
#define YY_FTN_REJECT   {yy_end = yy_my_start; yy_my_start = yy_old_start; REJECT;}
 
#define YY_INPUT(buf, result, max_size)   result=yyread(buf,max_size);
 
#define INITIAL   0
 
#define Start   1
 
#define SubCall   2
 
#define FuncDef   3
 
#define ClassName   4
 
#define ClassVar   5
 
#define Subprog   6
 
#define DocBlock   7
 
#define Use   8
 
#define UseOnly   9
 
#define Import   10
 
#define Declaration   11
 
#define DeclarationBinding   12
 
#define DeclContLine   13
 
#define Parameterlist   14
 
#define String   15
 
#define Subprogend   16
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( fortrancodeYYtext, fortrancodeYYleng, 1, fortrancodeYYout )) {} } 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 fortrancodeYYlex (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
 

Functions

void fortrancodeYYrestart (FILE *input_file)
 
void fortrancodeYY_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE fortrancodeYY_create_buffer (FILE *file, int size)
 
void fortrancodeYY_delete_buffer (YY_BUFFER_STATE b)
 
void fortrancodeYY_flush_buffer (YY_BUFFER_STATE b)
 
void fortrancodeYYpush_buffer_state (YY_BUFFER_STATE new_buffer)
 
void fortrancodeYYpop_buffer_state (void)
 
static void fortrancodeYYensure_buffer_stack (void)
 
static void fortrancodeYY_load_buffer_state (void)
 
static void fortrancodeYY_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
YY_BUFFER_STATE fortrancodeYY_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE fortrancodeYY_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE fortrancodeYY_scan_bytes (yyconst char *bytes, int len)
 
void * fortrancodeYYalloc (yy_size_t)
 
void * fortrancodeYYrealloc (void *, yy_size_t)
 
void fortrancodeYYfree (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 bool recognizeFixedForm (const char *contents, FortranFormat format)
 
static void endFontClass ()
 
static void startFontClass (const char *s)
 
static void setCurrentDoc (const QCString &anchor)
 
static void addToSearchIndex (const char *text)
 
static void startCodeLine ()
 
static void endCodeLine ()
 
static void codifyLines (char *text)
 
static void codifyLines (QCString str)
 
static void writeMultiLineCodeLink (CodeOutputInterface &ol, Definition *d, const char *text)
 
static bool getFortranNamespaceDefs (const QCString &mname, NamespaceDef *&cd)
 
static bool getFortranTypeDefs (const QCString &tname, const QCString &moduleName, ClassDef *&cd, UseSDict *usedict=0)
 
static bool getFortranDefs (const QCString &memberName, const QCString &moduleName, MemberDef *&md, UseSDict *usedict=0)
 
static bool getGenericProcedureLink (const ClassDef *cd, const char *memberText, CodeOutputInterface &ol)
 
static bool getLink (UseSDict *usedict, const char *memberText, CodeOutputInterface &ol, const char *text)
 
static void generateLink (CodeOutputInterface &ol, char *lname)
 
static int countLines ()
 
static void startScope ()
 
static void endScope ()
 
static void addUse (const QCString &moduleName)
 
static void addLocalVar (const QCString &varName)
 
static int yyread (char *buf, int max_size)
 
static int yy_init_globals (void)
 
int fortrancodeYYlex_destroy (void)
 
int fortrancodeYYget_debug (void)
 
void fortrancodeYYset_debug (int debug_flag)
 
YY_EXTRA_TYPE fortrancodeYYget_extra (void)
 
void fortrancodeYYset_extra (YY_EXTRA_TYPE user_defined)
 
FILE * fortrancodeYYget_in (void)
 
void fortrancodeYYset_in (FILE *in_str)
 
FILE * fortrancodeYYget_out (void)
 
void fortrancodeYYset_out (FILE *out_str)
 
int fortrancodeYYget_leng (void)
 
char * fortrancodeYYget_text (void)
 
int fortrancodeYYget_lineno (void)
 
void fortrancodeYYset_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 fortrancodeYYlex (void)
 
 if (!(yy_init))
 
 while (1)
 
static void yyunput (int c, register char *yy_bp)
 
static void yy_fatal_error (yyconst char *msg)
 
void resetFortranCodeParserState ()
 
void parseFortranCode (CodeOutputInterface &od, const char *className, const QCString &s, bool exBlock, const char *exName, FileDef *fd, int startLine, int endLine, bool inlineFragment, MemberDef *memberDef, bool, Definition *searchCtx, bool collectXRefs, FortranFormat format)
 
void fortrancodeYYdummy ()
 

Variables

int fortrancodeYYleng
 
FILE * fortrancodeYYin = (FILE *) 0
 
FILE * fortrancodeYYout = (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 fortrancodeYYlineno = 1
 
char * fortrancodeYYtext
 
static yyconst flex_int16_t yy_acclist [6342]
 
static yyconst flex_int16_t yy_accept [10606]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [74]
 
static yyconst flex_int32_t yy_base [12566]
 
static yyconst flex_int16_t yy_def [12566]
 
static yyconst flex_int16_t yy_nxt [99369]
 
static yyconst flex_int16_t yy_chk [99369]
 
int fortrancodeYY_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
 
int yy_old_start = 0
 
int yy_my_start = 0
 
int yy_end = 1
 
static QCString docBlock
 contents of all lines of a documentation block More...
 
static QCString currentModule =0
 name of the current enclosing module More...
 
static QCString currentClass =0
 name of the current enclosing class More...
 
static UseSDictuseMembers = new UseSDict
 info about used modules More...
 
static UseEntryuseEntry = 0
 current use statement info More...
 
static QList< ScopescopeStack
 
static QCString str =""
 
static CodeOutputInterfaceg_code
 

contents of fortran string

More...
 
static QCString g_parmType
 
static QCString g_parmName
 
static const char * g_inputString
 the code fragment as text More...
 
static int g_inputPosition
 read offset during parsing More...
 
static int g_inputLines
 number of line in the code fragment More...
 
static int g_yyLineNr
 current line number More...
 
static bool g_needsTermination
 
static Definitiong_searchCtx
 
static bool g_collectXRefs
 
static bool g_isFixedForm
 
static bool g_insideBody
 inside subprog/program body? => create links More...
 
static const char * g_currentFontClass
 
static bool g_exampleBlock
 
static QCString g_exampleName
 
static QCString g_exampleFile
 
static FileDefg_sourceFileDef
 
static Definitiong_currentDefinition
 
static MemberDefg_currentMemberDef
 
static bool g_includeCodeFragment
 
static char stringStartSymbol
 
static int bracketCount = 0
 
static bool g_endComment
 
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 BEGIN   (yy_start) = 1 + 2 *

Definition at line 144 of file fortrancode.cpp.

#define ClassName   4

Definition at line 27707 of file fortrancode.cpp.

#define ClassVar   5

Definition at line 27708 of file fortrancode.cpp.

#define DBG_CTX (   x)    do { } while(0)
Todo:
  • continutation lines not always recognized
    • merging of use-statements with same module name and different only-names
    • rename part of use-statement
    • links to interface functions
    • references to variables

Definition at line 27032 of file fortrancode.cpp.

#define Declaration   11

Definition at line 27714 of file fortrancode.cpp.

#define DeclarationBinding   12

Definition at line 27715 of file fortrancode.cpp.

#define DeclContLine   13

Definition at line 27716 of file fortrancode.cpp.

#define DocBlock   7

Definition at line 27710 of file fortrancode.cpp.

#define ECHO   do { if (fwrite( fortrancodeYYtext, fortrancodeYYleng, 1, fortrancodeYYout )) {} } while (0)

Definition at line 27816 of file fortrancode.cpp.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 179 of file fortrancode.cpp.

#define EOB_ACT_END_OF_FILE   1

Definition at line 180 of file fortrancode.cpp.

#define EOB_ACT_LAST_MATCH   2

Definition at line 181 of file fortrancode.cpp.

#define FLEX_BETA

Definition at line 33 of file fortrancode.cpp.

#define FLEX_SCANNER

Definition at line 28 of file fortrancode.cpp.

#define FLEXINT_H

Definition at line 49 of file fortrancode.cpp.

#define fortrancodeYYwrap (   n)    1

Definition at line 354 of file fortrancode.cpp.

#define FuncDef   3

Definition at line 27706 of file fortrancode.cpp.

#define Import   10

Definition at line 27713 of file fortrancode.cpp.

#define INITIAL   0

Definition at line 27703 of file fortrancode.cpp.

#define INT16_MAX   (32767)

Definition at line 92 of file fortrancode.cpp.

#define INT16_MIN   (-32767-1)

Definition at line 83 of file fortrancode.cpp.

#define INT32_MAX   (2147483647)

Definition at line 95 of file fortrancode.cpp.

#define INT32_MIN   (-2147483647-1)

Definition at line 86 of file fortrancode.cpp.

#define INT8_MAX   (127)

Definition at line 89 of file fortrancode.cpp.

#define INT8_MIN   (-128)

Definition at line 80 of file fortrancode.cpp.

#define Parameterlist   14

Definition at line 27717 of file fortrancode.cpp.

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

Definition at line 26962 of file fortrancode.cpp.

#define Start   1

Definition at line 27704 of file fortrancode.cpp.

#define String   15

Definition at line 27718 of file fortrancode.cpp.

#define SubCall   2

Definition at line 27705 of file fortrancode.cpp.

#define Subprog   6

Definition at line 27709 of file fortrancode.cpp.

#define Subprogend   16

Definition at line 27719 of file fortrancode.cpp.

#define UINT16_MAX   (65535U)

Definition at line 101 of file fortrancode.cpp.

#define UINT32_MAX   (4294967295U)

Definition at line 104 of file fortrancode.cpp.

#define UINT8_MAX   (255U)

Definition at line 98 of file fortrancode.cpp.

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

Definition at line 199 of file fortrancode.cpp.

#define Use   8

Definition at line 27711 of file fortrancode.cpp.

#define UseOnly   9

Definition at line 27712 of file fortrancode.cpp.

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 350 of file fortrancode.cpp.

#define YY_BREAK   break;

Definition at line 27895 of file fortrancode.cpp.

#define YY_BUF_SIZE   16384

Definition at line 163 of file fortrancode.cpp.

#define YY_BUFFER_EOF_PENDING   2

Definition at line 266 of file fortrancode.cpp.

#define YY_BUFFER_NEW   0

Definition at line 254 of file fortrancode.cpp.

#define YY_BUFFER_NORMAL   1

Definition at line 255 of file fortrancode.cpp.

#define yy_create_buffer   fortrancodeYY_create_buffer

Definition at line 9 of file fortrancode.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 fortrancode.cpp.

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 289 of file fortrancode.cpp.

#define YY_DECL   int fortrancodeYYlex (void)

Definition at line 27883 of file fortrancode.cpp.

#define YY_DECL_IS_OURS   1

Definition at line 27879 of file fortrancode.cpp.

#define yy_delete_buffer   fortrancodeYY_delete_buffer

Definition at line 10 of file fortrancode.cpp.

#define YY_DO_BEFORE_ACTION
Value:
fortrancodeYYleng = (size_t) (yy_cp - yy_bp); \
*yy_cp = '\0'; \
static char yy_hold_char
register char * yy_bp
static char * yy_c_buf_p
register char * yy_cp
int fortrancodeYYleng
#define yytext_ptr

Definition at line 378 of file fortrancode.cpp.

#define YY_END_OF_BUFFER   67

Definition at line 386 of file fortrancode.cpp.

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 159 of file fortrancode.cpp.

#define YY_EXIT_FAILURE   2

Definition at line 29599 of file fortrancode.cpp.

#define YY_EXTRA_TYPE   void *

Definition at line 27730 of file fortrancode.cpp.

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 27870 of file fortrancode.cpp.

#define yy_flex_debug   fortrancodeYY_flex_debug

Definition at line 11 of file fortrancode.cpp.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 29 of file fortrancode.cpp.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 30 of file fortrancode.cpp.

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 31 of file fortrancode.cpp.

#define yy_flush_buffer   fortrancodeYY_flush_buffer

Definition at line 13 of file fortrancode.cpp.

#define YY_FLUSH_BUFFER   fortrancodeYY_flush_buffer(YY_CURRENT_BUFFER )

Definition at line 318 of file fortrancode.cpp.

#define YY_FTN_REJECT   {yy_end = yy_my_start; yy_my_start = yy_old_start; REJECT;}

Definition at line 27050 of file fortrancode.cpp.

#define YY_FTN_RESET   {yy_old_start = 0; yy_my_start = 0; yy_end = 1;}

Definition at line 27049 of file fortrancode.cpp.

#define yy_init_buffer   fortrancodeYY_init_buffer

Definition at line 12 of file fortrancode.cpp.

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

Definition at line 27669 of file fortrancode.cpp.

#define YY_INT_ALIGNED   short int

Definition at line 5 of file fortrancode.cpp.

#define YY_LESS_LINENO (   n)

Definition at line 183 of file fortrancode.cpp.

#define yy_load_buffer_state   fortrancodeYY_load_buffer_state

Definition at line 14 of file fortrancode.cpp.

#define YY_MORE_ADJ   0

Definition at line 26974 of file fortrancode.cpp.

#define yy_new_buffer   fortrancodeYY_create_buffer

Definition at line 328 of file fortrancode.cpp.

#define YY_NEW_FILE   fortrancodeYYrestart(fortrancodeYYin )

Definition at line 157 of file fortrancode.cpp.

#define YY_NO_INPUT   1

Definition at line 27035 of file fortrancode.cpp.

#define YY_NO_TOP_STATE   1

Definition at line 27034 of file fortrancode.cpp.

#define YY_NO_UNISTD_H   1

Definition at line 27036 of file fortrancode.cpp.

#define YY_NULL   0

Definition at line 131 of file fortrancode.cpp.

#define YY_NUM_RULES   66

Definition at line 385 of file fortrancode.cpp.

#define YY_READ_BUF_SIZE   8192

Definition at line 27808 of file fortrancode.cpp.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 26975 of file fortrancode.cpp.

#define YY_RULE_SETUP
Value:
if ( fortrancodeYYleng > 0 ) \
char * fortrancodeYYtext
#define YY_USER_ACTION
int fortrancodeYYleng
#define YY_CURRENT_BUFFER_LVALUE

Definition at line 27898 of file fortrancode.cpp.

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

Definition at line 138 of file fortrancode.cpp.

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

Definition at line 340 of file fortrancode.cpp.

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

Definition at line 330 of file fortrancode.cpp.

#define YY_SKIP_YYWRAP

Definition at line 355 of file fortrancode.cpp.

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

Definition at line 150 of file fortrancode.cpp.

#define YY_START_STACK_INCR   25

Definition at line 27865 of file fortrancode.cpp.

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

Definition at line 168 of file fortrancode.cpp.

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

Definition at line 154 of file fortrancode.cpp.

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 207 of file fortrancode.cpp.

#define yy_switch_to_buffer   fortrancodeYY_switch_to_buffer

Definition at line 15 of file fortrancode.cpp.

#define YY_TRAILING_HEAD_MASK   0x4000

Definition at line 26961 of file fortrancode.cpp.

#define YY_TRAILING_MASK   0x2000

Definition at line 26960 of file fortrancode.cpp.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 171 of file fortrancode.cpp.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 202 of file fortrancode.cpp.

#define YY_USER_ACTION   {yy_old_start = yy_my_start; yy_my_start = yy_end; yy_end += fortrancodeYYleng;}

Definition at line 27048 of file fortrancode.cpp.

Definition at line 24 of file fortrancode.cpp.

#define yyconst

Definition at line 127 of file fortrancode.cpp.

#define yyfree   fortrancodeYYfree

Definition at line 26 of file fortrancode.cpp.

#define yyin   fortrancodeYYin

Definition at line 16 of file fortrancode.cpp.

#define yyleng   fortrancodeYYleng

Definition at line 17 of file fortrancode.cpp.

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

Definition at line 29611 of file fortrancode.cpp.

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

Definition at line 29611 of file fortrancode.cpp.

#define yylex   fortrancodeYYlex

Definition at line 18 of file fortrancode.cpp.

#define yylineno   fortrancodeYYlineno

Definition at line 19 of file fortrancode.cpp.

#define yymore ( )    yymore_used_but_not_detected

Definition at line 26973 of file fortrancode.cpp.

#define yyout   fortrancodeYYout

Definition at line 20 of file fortrancode.cpp.

#define yyrealloc   fortrancodeYYrealloc

Definition at line 25 of file fortrancode.cpp.

#define yyrestart   fortrancodeYYrestart

Definition at line 21 of file fortrancode.cpp.

#define YYSTATE   YY_START

Definition at line 151 of file fortrancode.cpp.

#define YYTABLES_NAME   "yytables"

Definition at line 29817 of file fortrancode.cpp.

#define yyterminate ( )    return YY_NULL

Definition at line 27860 of file fortrancode.cpp.

#define yytext   fortrancodeYYtext

Definition at line 22 of file fortrancode.cpp.

#define yytext_ptr   fortrancodeYYtext

Definition at line 368 of file fortrancode.cpp.

#define yywrap   fortrancodeYYwrap

Definition at line 23 of file fortrancode.cpp.

Typedef Documentation

typedef short int flex_int16_t

Definition at line 71 of file fortrancode.cpp.

typedef int flex_int32_t

Definition at line 72 of file fortrancode.cpp.

typedef signed char flex_int8_t

Definition at line 70 of file fortrancode.cpp.

typedef unsigned short int flex_uint16_t

Definition at line 74 of file fortrancode.cpp.

typedef unsigned int flex_uint32_t

Definition at line 75 of file fortrancode.cpp.

typedef unsigned char flex_uint8_t

Definition at line 73 of file fortrancode.cpp.

Definition at line 172 of file fortrancode.cpp.

typedef unsigned char YY_CHAR

Definition at line 357 of file fortrancode.cpp.

typedef size_t yy_size_t

Definition at line 203 of file fortrancode.cpp.

typedef int yy_state_type

Definition at line 361 of file fortrancode.cpp.

Function Documentation

static void addLocalVar ( const QCString varName)
static

Definition at line 27659 of file fortrancode.cpp.

27660 {
27661  if (!scopeStack.isEmpty())
27662  scopeStack.getLast()->localVars.insert(varName, (void*)1);
27663 }
static QList< Scope > scopeStack
static void addToSearchIndex ( const char *  text)
static

Definition at line 27215 of file fortrancode.cpp.

27216 {
27218  {
27220  }
27221 }
const bool FALSE
Definition: qglobal.h:370
static SearchIndexIntf * searchIndex
Definition: doxygen.h:133
virtual void addWord(const char *word, bool hiPriority)=0
static void addUse ( const QCString moduleName)
static

Definition at line 27653 of file fortrancode.cpp.

27654 {
27655  if (!scopeStack.isEmpty())
27656  scopeStack.getLast()->useNames.append(moduleName);
27657 }
static QList< Scope > scopeStack
static void codifyLines ( char *  text)
static

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

Definition at line 27285 of file fortrancode.cpp.

27286 {
27287  //printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text);
27288  char *p=text,*sp=p;
27289  char c;
27290  bool done=FALSE;
27291  const char * tmp_currentFontClass = g_currentFontClass;
27292  while (!done)
27293  {
27294  sp=p;
27295  while ((c=*p++) && c!='\n') { }
27296  if (c=='\n')
27297  {
27298  g_yyLineNr++;
27299  *(p-1)='\0';
27300  g_code->codify(sp);
27301  endCodeLine();
27302  if (g_yyLineNr<g_inputLines)
27303  {
27304  startCodeLine();
27305  }
27306  if (tmp_currentFontClass)
27307  {
27308  startFontClass(tmp_currentFontClass);
27309  }
27310  }
27311  else
27312  {
27313  g_code->codify(sp);
27314  done=TRUE;
27315  }
27316  }
27317 }
const bool FALSE
Definition: qglobal.h:370
static int g_yyLineNr
current line number
static int g_inputLines
number of line in the code fragment
static void startCodeLine()
p
Definition: test.py:223
static const char * g_currentFontClass
virtual void codify(const char *s)=0
static CodeOutputInterface * g_code
contents of fortran string
const bool TRUE
Definition: qglobal.h:371
static void endCodeLine()
static void startFontClass(const char *s)
static void codifyLines ( QCString  str)
static

Definition at line 27319 of file fortrancode.cpp.

27320 {
27321  char *tmp= (char *) malloc(str.length()+1);
27322  strcpy(tmp, str);
27323  codifyLines(tmp);
27324  free(tmp);
27325 }
uint length() const
Definition: qcstring.h:195
static void codifyLines(char *text)
string tmp
Definition: languages.py:63
static int countLines ( )
static

counts the number of lines in the input

Definition at line 27606 of file fortrancode.cpp.

27607 {
27608  const char *p=g_inputString;
27609  char c;
27610  int count=1;
27611  while ((c=*p))
27612  {
27613  p++ ;
27614  if (c=='\n') count++;
27615  }
27616  if (p>g_inputString && *(p-1)!='\n')
27617  { // last line does not end with a \n, so we add an extra
27618  // line and explicitly terminate the line after parsing.
27619  count++,
27621  }
27622  return count;
27623 }
static bool g_needsTermination
p
Definition: test.py:223
const bool TRUE
Definition: qglobal.h:371
static const char * g_inputString
the code fragment as text
static void endCodeLine ( )
static

Definition at line 27276 of file fortrancode.cpp.

27277 {
27278  endFontClass();
27279  g_code->endCodeLine();
27280 }
static void endFontClass()
static CodeOutputInterface * g_code
contents of fortran string
virtual void endCodeLine()=0
static void endFontClass ( )
static

Definition at line 27179 of file fortrancode.cpp.

27180 {
27181  if (g_currentFontClass)
27182  {
27183  g_code->endFontClass();
27185  }
27186 }
virtual void endFontClass()=0
static const char * g_currentFontClass
static CodeOutputInterface * g_code
contents of fortran string
static void endScope ( )
static

end scope

Definition at line 27635 of file fortrancode.cpp.

27636 {
27637  DBG_CTX((stderr,"===> endScope %s",fortrancodeYYtext));
27638  if (scopeStack.isEmpty())
27639  {
27640  DBG_CTX((stderr,"WARNING: fortrancode.l: stack empty!\n"));
27641  return;
27642  }
27643 
27644  Scope *scope = scopeStack.getLast();
27645  scopeStack.removeLast();
27646  for ( QStringList::Iterator it = scope->useNames.begin(); it != scope->useNames.end(); ++it)
27647  {
27648  useMembers->remove((*it).utf8());
27649  }
27650  delete scope;
27651 }
static UseSDict * useMembers
info about used modules
char * fortrancodeYYtext
static QCString scope
Definition: declinfo.cpp:668
static QList< Scope > scopeStack
Iterator end()
Definition: qvaluelist.h:363
#define DBG_CTX(x)
bool remove(const char *key)
Definition: sortdict.h:166
QStringList useNames
contains names of used modules
Iterator begin()
Definition: qvaluelist.h:361
YY_BUFFER_STATE fortrancodeYY_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 29279 of file fortrancode.cpp.

29280 {
29282 
29283  b = (YY_BUFFER_STATE) fortrancodeYYalloc(sizeof( struct yy_buffer_state ) );
29284  if ( ! b )
29285  YY_FATAL_ERROR( "out of dynamic memory in fortrancodeYY_create_buffer()" );
29286 
29287  b->yy_buf_size = size;
29288 
29289  /* yy_ch_buf has to be 2 characters longer than the size given because
29290  * we need to put in 2 end-of-buffer characters.
29291  */
29292  b->yy_ch_buf = (char *) fortrancodeYYalloc(b->yy_buf_size + 2 );
29293  if ( ! b->yy_ch_buf )
29294  YY_FATAL_ERROR( "out of dynamic memory in fortrancodeYY_create_buffer()" );
29295 
29296  b->yy_is_our_buffer = 1;
29297 
29299 
29300  return b;
29301 }
#define YY_FATAL_ERROR(msg)
yy_size_t yy_buf_size
Definition: code.cpp:218
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
struct yy_buffer_state * YY_BUFFER_STATE
void * fortrancodeYYalloc(yy_size_t)
static void fortrancodeYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
static bool * b
Definition: config.cpp:1043
void fortrancodeYY_delete_buffer ( YY_BUFFER_STATE  b)

Destroy the buffer.

Parameters
ba buffer created with fortrancodeYY_create_buffer()

Definition at line 29307 of file fortrancode.cpp.

29308 {
29309 
29310  if ( ! b )
29311  return;
29312 
29313  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
29315 
29316  if ( b->yy_is_our_buffer )
29317  fortrancodeYYfree((void *) b->yy_ch_buf );
29318 
29319  fortrancodeYYfree((void *) b );
29320 }
#define YY_CURRENT_BUFFER
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
struct yy_buffer_state * YY_BUFFER_STATE
#define YY_CURRENT_BUFFER_LVALUE
void fortrancodeYYfree(void *)
void fortrancodeYY_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 29354 of file fortrancode.cpp.

29355 {
29356  if ( ! b )
29357  return;
29358 
29359  b->yy_n_chars = 0;
29360 
29361  /* We always need two end-of-buffer characters. The first causes
29362  * a transition to the end-of-buffer state. The second causes
29363  * a jam in that state.
29364  */
29367 
29368  b->yy_buf_pos = &b->yy_ch_buf[0];
29369 
29370  b->yy_at_bol = 1;
29372 
29373  if ( b == YY_CURRENT_BUFFER )
29375 }
char * yy_buf_pos
Definition: code.cpp:213
int yy_n_chars
Definition: code.cpp:223
#define YY_CURRENT_BUFFER
#define YY_END_OF_BUFFER_CHAR
#define YY_BUFFER_NEW
char * yy_ch_buf
Definition: code.cpp:212
int yy_buffer_status
Definition: code.cpp:252
static void fortrancodeYY_load_buffer_state(void)
static void fortrancodeYY_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)
static

Definition at line 29326 of file fortrancode.cpp.

29328 {
29329  int oerrno = errno;
29330 
29332 
29333  b->yy_input_file = file;
29334  b->yy_fill_buffer = 1;
29335 
29336  /* If b is the current buffer, then fortrancodeYY_init_buffer was _probably_
29337  * called from fortrancodeYYrestart() or through yy_get_next_buffer.
29338  * In that case, we don't want to reset the lineno or column.
29339  */
29340  if (b != YY_CURRENT_BUFFER){
29341  b->yy_bs_lineno = 1;
29342  b->yy_bs_column = 0;
29343  }
29344 
29345  b->yy_is_interactive = 0;
29346 
29347  errno = oerrno;
29348 }
FILE * yy_input_file
Definition: code.cpp:210
#define YY_CURRENT_BUFFER
int yy_fill_buffer
Definition: code.cpp:250
int yy_bs_lineno
Definition: code.cpp:244
int errno
Contains the last error code.
Definition: structcmd.h:53
int yy_bs_column
Definition: code.cpp:245
void fortrancodeYY_flush_buffer(YY_BUFFER_STATE b)
int yy_is_interactive
Definition: code.cpp:236
static void fortrancodeYY_load_buffer_state ( void  )
static

Definition at line 29265 of file fortrancode.cpp.

29266 {
29267  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
29268  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
29269  fortrancodeYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
29270  (yy_hold_char) = *(yy_c_buf_p);
29271 }
static char yy_hold_char
FILE * fortrancodeYYin
static char * yy_c_buf_p
#define yytext_ptr
static int yy_n_chars
#define YY_CURRENT_BUFFER_LVALUE
YY_BUFFER_STATE fortrancodeYY_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 29481 of file fortrancode.cpp.

29482 {
29484 
29485  if ( size < 2 ||
29488  /* They forgot to leave room for the EOB's. */
29489  return 0;
29490 
29491  b = (YY_BUFFER_STATE) fortrancodeYYalloc(sizeof( struct yy_buffer_state ) );
29492  if ( ! b )
29493  YY_FATAL_ERROR( "out of dynamic memory in fortrancodeYY_scan_buffer()" );
29494 
29495  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
29496  b->yy_buf_pos = b->yy_ch_buf = base;
29497  b->yy_is_our_buffer = 0;
29498  b->yy_input_file = 0;
29499  b->yy_n_chars = b->yy_buf_size;
29500  b->yy_is_interactive = 0;
29501  b->yy_at_bol = 1;
29502  b->yy_fill_buffer = 0;
29504 
29506 
29507  return b;
29508 }
char * yy_buf_pos
Definition: code.cpp:213
FILE * yy_input_file
Definition: code.cpp:210
int yy_n_chars
Definition: code.cpp:223
#define YY_FATAL_ERROR(msg)
#define YY_END_OF_BUFFER_CHAR
int yy_fill_buffer
Definition: code.cpp:250
void fortrancodeYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
#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
char * yy_ch_buf
Definition: code.cpp:212
int yy_is_our_buffer
Definition: code.cpp:229
struct yy_buffer_state * YY_BUFFER_STATE
void * fortrancodeYYalloc(yy_size_t)
static bool * b
Definition: config.cpp:1043
int yy_is_interactive
Definition: code.cpp:236
int yy_buffer_status
Definition: code.cpp:252
YY_BUFFER_STATE fortrancodeYY_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len 
)

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

29532 {
29534  char *buf;
29535  yy_size_t n;
29536  int i;
29537 
29538  /* Get memory for full buffer, including space for trailing EOB's. */
29539  n = _yybytes_len + 2;
29540  buf = (char *) fortrancodeYYalloc(n );
29541  if ( ! buf )
29542  YY_FATAL_ERROR( "out of dynamic memory in fortrancodeYY_scan_bytes()" );
29543 
29544  for ( i = 0; i < _yybytes_len; ++i )
29545  buf[i] = yybytes[i];
29546 
29547  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
29548 
29549  b = fortrancodeYY_scan_buffer(buf,n );
29550  if ( ! b )
29551  YY_FATAL_ERROR( "bad buffer in fortrancodeYY_scan_bytes()" );
29552 
29553  /* It's okay to grow etc. this buffer, and we should throw it
29554  * away when we're done.
29555  */
29556  b->yy_is_our_buffer = 1;
29557 
29558  return b;
29559 }
YY_BUFFER_STATE fortrancodeYY_scan_buffer(char *base, yy_size_t size)
#define YY_FATAL_ERROR(msg)
#define YY_END_OF_BUFFER_CHAR
std::void_t< T > n
int yy_is_our_buffer
Definition: code.cpp:229
void * fortrancodeYYalloc(yy_size_t)
static bool * b
Definition: config.cpp:1043
size_t yy_size_t
Definition: code.cpp:203
YY_BUFFER_STATE fortrancodeYY_scan_string ( yyconst char *  yystr)

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

Definition at line 29518 of file fortrancode.cpp.

29519 {
29520 
29521  return fortrancodeYY_scan_bytes(yystr,strlen(yystr) );
29522 }
YY_BUFFER_STATE fortrancodeYY_scan_bytes(yyconst char *bytes, int len)
void fortrancodeYY_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Definition at line 29234 of file fortrancode.cpp.

29235 {
29236 
29237  /* TODO. We should be able to replace this entire function body
29238  * with
29239  * fortrancodeYYpop_buffer_state();
29240  * fortrancodeYYpush_buffer_state(new_buffer);
29241  */
29243  if ( YY_CURRENT_BUFFER == new_buffer )
29244  return;
29245 
29246  if ( YY_CURRENT_BUFFER )
29247  {
29248  /* Flush out information for old buffer. */
29249  *(yy_c_buf_p) = (yy_hold_char);
29250  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
29251  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
29252  }
29253 
29254  YY_CURRENT_BUFFER_LVALUE = new_buffer;
29256 
29257  /* We don't actually know whether we did this switch during
29258  * EOF (fortrancodeYYwrap()) processing, but the only time this flag
29259  * is looked at is after fortrancodeYYwrap() is called, so it's safe
29260  * to go ahead and always set it.
29261  */
29263 }
#define YY_CURRENT_BUFFER
static char yy_hold_char
static int yy_did_buffer_switch_on_eof
static char * yy_c_buf_p
static void fortrancodeYYensure_buffer_stack(void)
static int yy_n_chars
#define YY_CURRENT_BUFFER_LVALUE
static void fortrancodeYY_load_buffer_state(void)
void * fortrancodeYYalloc ( yy_size_t  size)

Definition at line 29795 of file fortrancode.cpp.

29796 {
29797  return (void *) malloc( size );
29798 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void fortrancodeYYdummy ( )

Definition at line 29916 of file fortrancode.cpp.

29916 { yy_top_state(); }
static int yy_top_state(void)
static void fortrancodeYYensure_buffer_stack ( void  )
static

Definition at line 29432 of file fortrancode.cpp.

29433 {
29434  int num_to_alloc;
29435 
29436  if (!(yy_buffer_stack)) {
29437 
29438  /* First allocation is just for 2 elements, since we don't know if this
29439  * scanner will even need a stack. We use 2 instead of 1 to avoid an
29440  * immediate realloc on the next call.
29441  */
29442  num_to_alloc = 1;
29444  (num_to_alloc * sizeof(struct yy_buffer_state*)
29445  );
29446  if ( ! (yy_buffer_stack) )
29447  YY_FATAL_ERROR( "out of dynamic memory in fortrancodeYYensure_buffer_stack()" );
29448 
29449  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
29450 
29451  (yy_buffer_stack_max) = num_to_alloc;
29452  (yy_buffer_stack_top) = 0;
29453  return;
29454  }
29455 
29456  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
29457 
29458  /* Increase the buffer to prepare for a possible push. */
29459  int grow_size = 8 /* arbitrary grow size */;
29460 
29461  num_to_alloc = (yy_buffer_stack_max) + grow_size;
29463  ((yy_buffer_stack),
29464  num_to_alloc * sizeof(struct yy_buffer_state*)
29465  );
29466  if ( ! (yy_buffer_stack) )
29467  YY_FATAL_ERROR( "out of dynamic memory in fortrancodeYYensure_buffer_stack()" );
29468 
29469  /* zero only the new slots.*/
29470  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
29471  (yy_buffer_stack_max) = num_to_alloc;
29472  }
29473 }
static size_t yy_buffer_stack_top
#define YY_FATAL_ERROR(msg)
static size_t yy_buffer_stack_max
void * fortrancodeYYrealloc(void *, yy_size_t)
static YY_BUFFER_STATE * yy_buffer_stack
void * fortrancodeYYalloc(yy_size_t)
void fortrancodeYYfree ( void *  ptr)

Definition at line 29812 of file fortrancode.cpp.

29813 {
29814  free( (char *) ptr ); /* see fortrancodeYYrealloc() for (char *) cast */
29815 }
int fortrancodeYYget_debug ( void  )

Definition at line 29695 of file fortrancode.cpp.

29696 {
29697  return fortrancodeYY_flex_debug;
29698 }
int fortrancodeYY_flex_debug
YY_EXTRA_TYPE fortrancodeYYget_extra ( void  )
FILE * fortrancodeYYget_in ( void  )

Get the input stream.

Definition at line 29639 of file fortrancode.cpp.

29640 {
29641  return fortrancodeYYin;
29642 }
FILE * fortrancodeYYin
int fortrancodeYYget_leng ( void  )

Get the length of the current token.

Definition at line 29655 of file fortrancode.cpp.

29656 {
29657  return fortrancodeYYleng;
29658 }
int fortrancodeYYleng
int fortrancodeYYget_lineno ( void  )

Get the current line number.

Definition at line 29630 of file fortrancode.cpp.

29631 {
29632 
29633  return fortrancodeYYlineno;
29634 }
int fortrancodeYYlineno
FILE * fortrancodeYYget_out ( void  )

Get the output stream.

Definition at line 29647 of file fortrancode.cpp.

29648 {
29649  return fortrancodeYYout;
29650 }
FILE * fortrancodeYYout
char * fortrancodeYYget_text ( void  )

Get the current token.

Definition at line 29664 of file fortrancode.cpp.

29665 {
29666  return fortrancodeYYtext;
29667 }
char * fortrancodeYYtext
int fortrancodeYYlex ( void  )
int fortrancodeYYlex_destroy ( void  )

Definition at line 29743 of file fortrancode.cpp.

29744 {
29745 
29746  /* Pop the buffer stack, destroying each element. */
29747  while(YY_CURRENT_BUFFER){
29749  YY_CURRENT_BUFFER_LVALUE = NULL;
29751  }
29752 
29753  /* Destroy the stack itself. */
29755  (yy_buffer_stack) = NULL;
29756 
29757  /* Destroy the start condition stack. */
29759  (yy_start_stack) = NULL;
29760 
29762  (yy_state_buf) = NULL;
29763 
29764  /* Reset the globals. This is important in a non-reentrant scanner so the next time
29765  * fortrancodeYYlex() is called, initialization will occur. */
29766  yy_init_globals( );
29767 
29768  return 0;
29769 }
#define YY_CURRENT_BUFFER
static yy_state_type * yy_state_buf
static YY_BUFFER_STATE * yy_buffer_stack
static int yy_init_globals(void)
static int * yy_start_stack
void fortrancodeYY_delete_buffer(YY_BUFFER_STATE b)
#define YY_CURRENT_BUFFER_LVALUE
void fortrancodeYYpop_buffer_state(void)
void fortrancodeYYfree(void *)
void fortrancodeYYpop_buffer_state ( void  )

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

Definition at line 29413 of file fortrancode.cpp.

29414 {
29415  if (!YY_CURRENT_BUFFER)
29416  return;
29417 
29419  YY_CURRENT_BUFFER_LVALUE = NULL;
29420  if ((yy_buffer_stack_top) > 0)
29421  --(yy_buffer_stack_top);
29422 
29423  if (YY_CURRENT_BUFFER) {
29426  }
29427 }
static size_t yy_buffer_stack_top
#define YY_CURRENT_BUFFER
static int yy_did_buffer_switch_on_eof
void fortrancodeYY_delete_buffer(YY_BUFFER_STATE b)
#define YY_CURRENT_BUFFER_LVALUE
static void fortrancodeYY_load_buffer_state(void)
void fortrancodeYYpush_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 29383 of file fortrancode.cpp.

29384 {
29385  if (new_buffer == NULL)
29386  return;
29387 
29389 
29390  /* This block is copied from fortrancodeYY_switch_to_buffer. */
29391  if ( YY_CURRENT_BUFFER )
29392  {
29393  /* Flush out information for old buffer. */
29394  *(yy_c_buf_p) = (yy_hold_char);
29395  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
29396  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
29397  }
29398 
29399  /* Only push if top exists. Otherwise, replace top. */
29400  if (YY_CURRENT_BUFFER)
29401  (yy_buffer_stack_top)++;
29402  YY_CURRENT_BUFFER_LVALUE = new_buffer;
29403 
29404  /* copied from fortrancodeYY_switch_to_buffer. */
29407 }
static size_t yy_buffer_stack_top
#define YY_CURRENT_BUFFER
static char yy_hold_char
static int yy_did_buffer_switch_on_eof
static char * yy_c_buf_p
static void fortrancodeYYensure_buffer_stack(void)
static int yy_n_chars
#define YY_CURRENT_BUFFER_LVALUE
static void fortrancodeYY_load_buffer_state(void)
void * fortrancodeYYrealloc ( void *  ptr,
yy_size_t  size 
)

Definition at line 29800 of file fortrancode.cpp.

29801 {
29802  /* The cast to (char *) in the following accommodates both
29803  * implementations that use char* generic pointers, and those
29804  * that use void* generic pointers. It works with the latter
29805  * because both ANSI C and C++ allow castless assignment from
29806  * any pointer type to void*, and deal with argument conversions
29807  * as though doing an assignment.
29808  */
29809  return (void *) realloc( (char *) ptr, size );
29810 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void fortrancodeYYrestart ( 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 29217 of file fortrancode.cpp.

29218 {
29219 
29220  if ( ! YY_CURRENT_BUFFER ){
29224  }
29225 
29228 }
#define YY_CURRENT_BUFFER
FILE * fortrancodeYYin
#define YY_BUF_SIZE
static void fortrancodeYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
static void fortrancodeYYensure_buffer_stack(void)
YY_BUFFER_STATE fortrancodeYY_create_buffer(FILE *file, int size)
#define YY_CURRENT_BUFFER_LVALUE
static void fortrancodeYY_load_buffer_state(void)
void fortrancodeYYset_debug ( int  debug_flag)

Definition at line 29700 of file fortrancode.cpp.

29701 {
29702  fortrancodeYY_flex_debug = bdebug ;
29703 }
int fortrancodeYY_flex_debug
void fortrancodeYYset_extra ( YY_EXTRA_TYPE  user_defined)
void fortrancodeYYset_in ( FILE *  in_str)

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

Parameters
in_strA readable stream.
See also
fortrancodeYY_switch_to_buffer

Definition at line 29685 of file fortrancode.cpp.

29686 {
29687  fortrancodeYYin = in_str ;
29688 }
FILE * fortrancodeYYin
void fortrancodeYYset_lineno ( int  line_number)

Set the current line number.

Parameters
line_number

Definition at line 29673 of file fortrancode.cpp.

29674 {
29675 
29676  fortrancodeYYlineno = line_number;
29677 }
int fortrancodeYYlineno
void fortrancodeYYset_out ( FILE *  out_str)

Definition at line 29690 of file fortrancode.cpp.

29691 {
29692  fortrancodeYYout = out_str ;
29693 }
FILE * fortrancodeYYout
static void generateLink ( CodeOutputInterface ol,
char *  lname 
)
static

Definition at line 27563 of file fortrancode.cpp.

27564 {
27565  ClassDef *cd=0;
27566  NamespaceDef *nsd=0;
27567  QCString tmp = lname;
27568  tmp = removeRedundantWhiteSpace(tmp.lower());
27569 
27570  // check if lowercase lname is a linkable type or interface
27571  if ( (getFortranTypeDefs(tmp, currentModule, cd, useMembers)) && cd->isLinkable() )
27572  {
27573  if ( (cd->compoundType() == ClassDef::Class) && // was Entry::INTERFACE_SEC) &&
27574  (getGenericProcedureLink(cd, tmp, ol)) )
27575  {
27576  //cout << "=== generic procedure resolved" << endl;
27577  }
27578  else
27579  { // write type or interface link
27580  writeMultiLineCodeLink(ol,cd,tmp);
27581  addToSearchIndex(tmp.data());
27582  }
27583  }
27584  // check for module
27585  else if ( (getFortranNamespaceDefs(tmp, nsd)) && nsd->isLinkable() )
27586  { // write module link
27587  writeMultiLineCodeLink(ol,nsd,tmp);
27588  addToSearchIndex(tmp.data());
27589  }
27590  // check for function/variable
27591  else if (getLink(useMembers, tmp, ol, tmp))
27592  {
27593  //cout << "=== found link for lowercase " << lname << endl;
27594  }
27595  else
27596  {
27597  // nothing found, just write out the word
27598  //startFontClass("charliteral"); //test
27599  codifyLines(tmp);
27600  //endFontClass(); //test
27601  addToSearchIndex(tmp.data());
27602  }
27603 }
CompoundType compoundType() const
Definition: classdef.cpp:4394
static void writeMultiLineCodeLink(CodeOutputInterface &ol, Definition *d, const char *text)
static UseSDict * useMembers
info about used modules
static bool getFortranTypeDefs(const QCString &tname, const QCString &moduleName, ClassDef *&cd, UseSDict *usedict=0)
static void codifyLines(char *text)
bool isLinkable() const
const char * data() const
Definition: qcstring.h:207
bool isLinkable() const
Definition: classdef.cpp:2729
string tmp
Definition: languages.py:63
static void addToSearchIndex(const char *text)
static bool getFortranNamespaceDefs(const QCString &mname, NamespaceDef *&cd)
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:1655
static QCString currentModule
name of the current enclosing module
static bool getLink(UseSDict *usedict, const char *memberText, CodeOutputInterface &ol, const char *text)
QCString lower() const
Definition: qcstring.cpp:263
static bool getGenericProcedureLink(const ClassDef *cd, const char *memberText, CodeOutputInterface &ol)
static bool getFortranDefs ( const QCString memberName,
const QCString moduleName,
MemberDef *&  md,
UseSDict usedict = 0 
)
static

searches for definition of function memberName

Parameters
memberNamethe name of the function/variable
moduleNamename of enclosing module or null, if global entry
mdthe entry, if found or null
usedictarray of data of USE-statement
Returns
true, if found

Definition at line 27439 of file fortrancode.cpp.

27441 {
27442  if (memberName.isEmpty()) return FALSE; /* empty name => nothing to link */
27443 
27444  // look in local variables
27446  Scope *scope;
27447  for (it.toLast();(scope=it.current());--it)
27448  {
27449  if (scope->localVars.find(memberName))
27450  return FALSE;
27451  }
27452 
27453  // search for function
27454  MemberName *mn = Doxygen::functionNameSDict->find(memberName);
27455  if (!mn)
27456  {
27457  mn = Doxygen::memberNameSDict->find(memberName);
27458  }
27459 
27460  if (mn) // name is known
27461  {
27462  MemberListIterator mli(*mn);
27463  for (mli.toFirst();(md=mli.current());++mli) // all found functions with given name
27464  {
27465  FileDef *fd=md->getFileDef();
27466  GroupDef *gd=md->getGroupDef();
27467  ClassDef *cd=md->getClassDef();
27468 
27469  //cout << "found link with same name: " << fd->fileName() << " " << memberName;
27470  //if (md->getNamespaceDef() != 0) cout << " in namespace " << md->getNamespaceDef()->name();cout << endl;
27471 
27472  if ((gd && gd->isLinkable()) || (fd && fd->isLinkable()))
27473  {
27474  NamespaceDef *nspace= md->getNamespaceDef();
27475 
27476  if (nspace == 0)
27477  { // found function in global scope
27478  if(cd == 0) { // Skip if bound to type
27479  return TRUE;
27480  }
27481  }
27482  else if (moduleName == nspace->name())
27483  { // found in local scope
27484  return TRUE;
27485  }
27486  else
27487  { // else search in used modules
27488  QCString moduleName= nspace->name();
27489  UseEntry *ue= usedict->find(moduleName);
27490  if (ue)
27491  {
27492  // check if only-list exists and if current entry exists is this list
27493  QStringList &only= ue->onlyNames;
27494  if (only.isEmpty())
27495  {
27496  //cout << " found in module " << moduleName << " entry " << memberName << endl;
27497  return TRUE; // whole module used
27498  }
27499  else
27500  {
27501  for ( QStringList::Iterator it = only.begin(); it != only.end(); ++it)
27502  {
27503  //cout << " search in only: " << moduleName << ":: " << memberName << "==" << (*it)<< endl;
27504  if (memberName == (*it).utf8())
27505  {
27506  return TRUE; // found in ONLY-part of use list
27507  }
27508  }
27509  }
27510  }
27511  }
27512  } // if linkable
27513  } // for
27514  }
27515  return FALSE;
27516 }
static MemberNameSDict * functionNameSDict
Definition: doxygen.h:116
bool isLinkable() const
Definition: groupdef.cpp:1645
static QCString scope
Definition: declinfo.cpp:668
QDict< void > localVars
contains names of local variables
bool isLinkable() const
Definition: filedef.h:117
bool isEmpty() const
Definition: qcstring.h:189
static QList< Scope > scopeStack
Iterator end()
Definition: qvaluelist.h:363
const bool FALSE
Definition: qglobal.h:370
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
const QCString & name() const
Definition: definition.h:114
A list of strings.
Definition: qstringlist.h:51
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
static MemberNameSDict * memberNameSDict
Definition: doxygen.h:115
Iterator begin()
Definition: qvaluelist.h:361
NamespaceDef * getNamespaceDef() const
Definition: memberdef.cpp:4080
bool isEmpty() const
Definition: qvaluelist.h:368
T * find(const char *key)
Definition: sortdict.h:232
const bool TRUE
Definition: qglobal.h:371
QStringList onlyNames
static bool getFortranNamespaceDefs ( const QCString mname,
NamespaceDef *&  cd 
)
static

searches for definition of a module (Namespace)

Parameters
mnamethe name of the module
cdthe entry, if found or null
Returns
true, if module is found

Definition at line 27378 of file fortrancode.cpp.

27380 {
27381  if (mname.isEmpty()) return FALSE; /* empty name => nothing to link */
27382 
27383  // search for module
27384  if ((cd=Doxygen::namespaceSDict->find(mname))) return TRUE;
27385 
27386  return FALSE;
27387 }
bool isEmpty() const
Definition: qcstring.h:189
const bool FALSE
Definition: qglobal.h:370
static NamespaceSDict * namespaceSDict
Definition: doxygen.h:120
const bool TRUE
Definition: qglobal.h:371
static bool getFortranTypeDefs ( const QCString tname,
const QCString moduleName,
ClassDef *&  cd,
UseSDict usedict = 0 
)
static

searches for definition of a type

Parameters
tnamethe name of the type
moduleNamename of enclosing module or null, if global entry
cdthe entry, if found or null
useDictdictionary of data of USE-statement
Returns
true, if type is found

Definition at line 27397 of file fortrancode.cpp.

27399 {
27400  if (tname.isEmpty()) return FALSE; /* empty name => nothing to link */
27401 
27402  //cout << "=== search for type: " << tname << endl;
27403 
27404  // search for type
27405  if ((cd=Doxygen::classSDict->find(tname)))
27406  {
27407  //cout << "=== type found in global module" << endl;
27408  return TRUE;
27409  }
27410  else if (moduleName && (cd= Doxygen::classSDict->find(moduleName+"::"+tname)))
27411  {
27412  //cout << "=== type found in local module" << endl;
27413  return TRUE;
27414  }
27415  else
27416  {
27417  UseEntry *use;
27418  for (UseSDict::Iterator di(*usedict); (use=di.current()); ++di)
27419  {
27420  if ((cd= Doxygen::classSDict->find(use->module+"::"+tname)))
27421  {
27422  //cout << "=== type found in used module" << endl;
27423  return TRUE;
27424  }
27425  }
27426  }
27427 
27428  return FALSE;
27429 }
bool isEmpty() const
Definition: qcstring.h:189
const bool FALSE
Definition: qglobal.h:370
QCString module
friend class Iterator
Definition: sortdict.h:289
static ClassSDict * classSDict
Definition: doxygen.h:99
const bool TRUE
Definition: qglobal.h:371
static bool getGenericProcedureLink ( const ClassDef cd,
const char *  memberText,
CodeOutputInterface ol 
)
static

gets the link to a generic procedure which depends not on the name, but on the parameter list

Todo:
implementation

Definition at line 27522 of file fortrancode.cpp.

27525 {
27526  (void)cd;
27527  (void)memberText;
27528  (void)ol;
27529  return FALSE;
27530 }
const bool FALSE
Definition: qglobal.h:370
static bool getLink ( UseSDict usedict,
const char *  memberText,
CodeOutputInterface ol,
const char *  text 
)
static

Definition at line 27532 of file fortrancode.cpp.

27536 {
27537  MemberDef *md=0;
27538  QCString memberName= removeRedundantWhiteSpace(memberText);
27539 
27540  if (getFortranDefs(memberName, currentModule, md, usedict) && md->isLinkable())
27541  {
27542  //if (md->isVariable()) return FALSE; // variables aren't handled yet
27543 
27545  md->getBodyDef() : md->getOuterScope();
27546  if (md->getGroupDef()) d = md->getGroupDef();
27547  if (d && d->isLinkable())
27548  {
27551  {
27553  }
27554  writeMultiLineCodeLink(ol,md,text ? text : memberText);
27555  addToSearchIndex(text ? text : memberText);
27556  return TRUE;
27557  }
27558  }
27559  return FALSE;
27560 }
static void writeMultiLineCodeLink(CodeOutputInterface &ol, Definition *d, const char *text)
virtual bool isLinkable() const =0
static MemberDef * g_currentMemberDef
FileDef * getBodyDef() const
const bool FALSE
Definition: qglobal.h:370
static bool g_collectXRefs
static NamespaceDef * globalScope
Definition: doxygen.h:128
static void addToSearchIndex(const char *text)
static bool g_insideBody
inside subprog/program body? => create links
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:1655
static QCString currentModule
name of the current enclosing module
virtual Definition * getOuterScope() const
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
void addDocCrossReference(MemberDef *src, MemberDef *dst)
Definition: util.cpp:8189
bool isLinkable() const
Definition: memberdef.cpp:1161
const bool TRUE
Definition: qglobal.h:371
static Definition * g_currentDefinition
static bool getFortranDefs(const QCString &memberName, const QCString &moduleName, MemberDef *&md, UseSDict *usedict=0)
if ( yy_init)

Definition at line 27920 of file fortrancode.cpp.

27921  {
27922  (yy_init) = 1;
27923 
27924 #ifdef YY_USER_INIT
27925  YY_USER_INIT;
27926 #endif
27927 
27928  /* Create the reject buffer large enough to save one state per allowed character. */
27929  if ( ! (yy_state_buf) )
27931  if ( ! (yy_state_buf) )
27932  YY_FATAL_ERROR( "out of dynamic memory in fortrancodeYYlex()" );
27933 
27934  if ( ! (yy_start) )
27935  (yy_start) = 1; /* first start state */
27936 
27937  if ( ! fortrancodeYYin )
27938  fortrancodeYYin = stdin;
27939 
27940  if ( ! fortrancodeYYout )
27942 
27943  if ( ! YY_CURRENT_BUFFER ) {
27947  }
27948 
27950  }
#define YY_STATE_BUF_SIZE
#define YY_CURRENT_BUFFER
#define YY_FATAL_ERROR(msg)
FILE * fortrancodeYYin
static yy_state_type * yy_state_buf
int yy_state_type
Definition: code.cpp:361
static int yy_start
FILE * fortrancodeYYout
#define YY_BUF_SIZE
void * fortrancodeYYalloc(yy_size_t)
static int yy_init
static void fortrancodeYYensure_buffer_stack(void)
YY_BUFFER_STATE fortrancodeYY_create_buffer(FILE *file, int size)
#define YY_CURRENT_BUFFER_LVALUE
static void fortrancodeYY_load_buffer_state(void)
void parseFortranCode ( CodeOutputInterface od,
const char *  className,
const QCString s,
bool  exBlock,
const char *  exName,
FileDef fd,
int  startLine,
int  endLine,
bool  inlineFragment,
MemberDef memberDef,
bool  ,
Definition searchCtx,
bool  collectXRefs,
FortranFormat  format 
)

Definition at line 29831 of file fortrancode.cpp.

29836 {
29837  //printf("***parseCode() exBlock=%d exName=%s fd=%p\n",exBlock,exName,fd);
29838 
29839  // used parameters
29840  (void)memberDef;
29841  (void)className;
29842 
29843  if (s.isEmpty()) return;
29844  printlex(fortrancodeYY_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL);
29846  g_code = &od;
29847  g_inputString = s;
29848  g_inputPosition = 0;
29849  g_isFixedForm = recognizeFixedForm((const char*)s,format);
29850  g_currentFontClass = 0;
29852  g_searchCtx = searchCtx;
29854  if (endLine!=-1)
29855  g_inputLines = endLine+1;
29856  else
29858 
29859  if (startLine!=-1)
29860  g_yyLineNr = startLine;
29861  else
29862  g_yyLineNr = 1;
29863 
29864  g_exampleBlock = exBlock;
29865  g_exampleName = exName;
29866  g_sourceFileDef = fd;
29867  if (exBlock && fd==0)
29868  {
29869  // create a dummy filedef for the example
29870  g_sourceFileDef = new FileDef("",exName);
29871  }
29872  if (g_sourceFileDef)
29873  {
29874  setCurrentDoc("l00001");
29875  }
29876  g_currentDefinition = 0;
29877  g_currentMemberDef = 0;
29878  if (!g_exampleName.isEmpty())
29879  {
29881  }
29882  g_includeCodeFragment = inlineFragment;
29883  startCodeLine();
29884  g_parmName.resize(0);
29885  g_parmType.resize(0);
29887  BEGIN( Start );
29888  fortrancodeYYlex();
29889  if (g_needsTermination)
29890  {
29891  endFontClass();
29892  g_code->endCodeLine();
29893  }
29894  if (fd)
29895  {
29897  }
29898  if (exBlock && g_sourceFileDef)
29899  {
29900  // delete the temporary file definition used for this example
29901  delete g_sourceFileDef;
29902  g_sourceFileDef=0;
29903  }
29904  printlex(fortrancodeYY_flex_debug, FALSE, __FILE__, fd ? fd->fileName().data(): NULL);
29905  return;
29906 }
static void setCurrentDoc(const QCString &anchor)
void fortrancodeYYrestart(FILE *input_file)
bool resize(uint newlen)
Definition: qcstring.h:225
static QCString g_parmType
static MemberDef * g_currentMemberDef
bool isEmpty() const
Definition: qcstring.h:189
void printlex(int dbg, bool enter, const char *lexName, const char *fileName)
Definition: message.cpp:242
FILE * fortrancodeYYin
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
Definition: qstring.cpp:11496
const bool FALSE
Definition: qglobal.h:370
static bool g_collectXRefs
static QCString className
Definition: declinfo.cpp:669
static int g_yyLineNr
current line number
void clearTooltips()
Definition: tooltip.cpp:54
static bool recognizeFixedForm(const char *contents, FortranFormat format)
static bool g_includeCodeFragment
static QCString g_exampleName
static QCString g_exampleFile
#define BEGIN
static int g_inputLines
number of line in the code fragment
static Definition * g_searchCtx
static bool g_needsTermination
static QCString g_parmName
static void startCodeLine()
static void endFontClass()
const char * data() const
Definition: qcstring.h:207
static FileDef * g_sourceFileDef
static int g_inputPosition
read offset during parsing
static const char * g_currentFontClass
static CodeOutputInterface * g_code
contents of fortran string
void writeTooltips(CodeOutputInterface &ol)
Definition: tooltip.cpp:93
#define Start
static bool g_exampleBlock
int fortrancodeYYlex(void)
static bool g_isFixedForm
static TooltipManager * instance()
Definition: tooltip.cpp:45
QCString fileName() const
Definition: filedef.h:81
QCString convertNameToFile(const char *name, bool allowDots, bool allowUnderscore)
Definition: util.cpp:5354
int fortrancodeYY_flex_debug
virtual void endCodeLine()=0
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
static const char * g_inputString
the code fragment as text
bool collectXRefs
static int countLines()
static Definition * g_currentDefinition
static bool recognizeFixedForm ( const char *  contents,
FortranFormat  format 
)
static

Definition at line 27136 of file fortrancode.cpp.

27137 {
27138  int column=0;
27139  bool skipLine=FALSE;
27140 
27141  if (format == FortranFormat_Fixed) return TRUE;
27142  if (format == FortranFormat_Free) return FALSE;
27143  for (int i=0;;i++)
27144  {
27145  column++;
27146 
27147  switch(contents[i])
27148  {
27149  case '\n':
27150  column=0;
27151  skipLine=FALSE;
27152  break;
27153  case ' ':
27154  break;
27155  case '#':
27156  skipLine=TRUE;
27157  break;
27158  case '\000':
27159  return FALSE;
27160  case 'C':
27161  case 'c':
27162  case '*':
27163  if(column==1) return TRUE;
27164  if(skipLine) break;
27165  return FALSE;
27166  case '!':
27167  if(column>1 && column<7) return FALSE;
27168  skipLine=TRUE;
27169  break;
27170  default:
27171  if(skipLine) break;
27172  if(column==7) return TRUE;
27173  return FALSE;
27174  }
27175  }
27176  return FALSE;
27177 }
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 resetFortranCodeParserState ( )

Definition at line 29829 of file fortrancode.cpp.

29829 {}
static void setCurrentDoc ( const QCString anchor)
static

Definition at line 27200 of file fortrancode.cpp.

27201 {
27203  {
27204  if (g_searchCtx)
27205  {
27207  }
27208  else
27209  {
27211  }
27212  }
27213 }
const bool FALSE
Definition: qglobal.h:370
static SearchIndexIntf * searchIndex
Definition: doxygen.h:133
static Definition * g_searchCtx
static FileDef * g_sourceFileDef
virtual void setCurrentDoc(Definition *ctx, const char *anchor, bool isSourceFile)=0
const bool TRUE
Definition: qglobal.h:371
virtual QCString anchor() const =0
static void startCodeLine ( )
static

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

Definition at line 27227 of file fortrancode.cpp.

27228 {
27229  if (g_sourceFileDef)
27230  {
27231  //QCString lineNumber,lineAnchor;
27232  //lineNumber.sprintf("%05d",g_yyLineNr);
27233  //lineAnchor.sprintf("l%05d",g_yyLineNr);
27234 
27236  //printf("startCodeLine %d d=%s\n", g_yyLineNr,d ? d->name().data() : "<null>");
27237  if (!g_includeCodeFragment && d)
27238  {
27241  g_insideBody = FALSE;
27242  g_endComment = FALSE;
27243  g_parmType.resize(0);
27244  g_parmName.resize(0);
27245  QCString lineAnchor;
27246  lineAnchor.sprintf("l%05d",g_yyLineNr);
27247  if (g_currentMemberDef)
27248  {
27252  setCurrentDoc(lineAnchor);
27253  }
27254  else if (d->isLinkableInProject())
27255  {
27257  d->getOutputFileBase(),
27258  0,g_yyLineNr);
27259  setCurrentDoc(lineAnchor);
27260  }
27261  }
27262  else
27263  {
27265  }
27266  }
27268  if (g_currentFontClass)
27269  {
27271  }
27272 }
static void setCurrentDoc(const QCString &anchor)
bool resize(uint newlen)
Definition: qcstring.h:225
static QCString g_parmType
static MemberDef * g_currentMemberDef
virtual QCString getReference() const
QCString getReference() const
Definition: memberdef.cpp:1001
virtual void writeLineNumber(const char *ref, const char *file, const char *anchor, int lineNumber)=0
MemberDef * getSourceMember(int lineNr) const
Definition: filedef.cpp:1226
virtual bool isLinkableInProject() const =0
const bool FALSE
Definition: qglobal.h:370
virtual void startFontClass(const char *clsName)=0
static int g_yyLineNr
current line number
virtual QCString getOutputFileBase() const =0
static bool g_includeCodeFragment
static QCString g_parmName
Definition * getSourceDefinition(int lineNr) const
Definition: filedef.cpp:1215
QCString anchor() const
Definition: memberdef.cpp:1031
static FileDef * g_sourceFileDef
static const char * g_currentFontClass
static bool g_insideBody
inside subprog/program body? => create links
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static CodeOutputInterface * g_code
contents of fortran string
virtual void startCodeLine(bool hasLineNumbers)=0
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
static bool g_endComment
static Definition * g_currentDefinition
static void startFontClass ( const char *  s)
static

Definition at line 27188 of file fortrancode.cpp.

27189 {
27190  // if font class is already set don't stop and start it.
27191  // strcmp does not like null pointers as input.
27193  {
27194  endFontClass();
27197  }
27198 }
virtual void startFontClass(const char *clsName)=0
static void endFontClass()
static const char * g_currentFontClass
static CodeOutputInterface * g_code
contents of fortran string
int strcmp(const String &s1, const String &s2)
Definition: relates.cpp:14
static QCString * s
Definition: config.cpp:1042
static void startScope ( )
static

start scope

Definition at line 27627 of file fortrancode.cpp.

27628 {
27629  DBG_CTX((stderr, "===> startScope %s",fortrancodeYYtext));
27630  Scope *scope = new Scope;
27631  scopeStack.append(scope);
27632 }
char * fortrancodeYYtext
static QCString scope
Definition: declinfo.cpp:668
static QList< Scope > scopeStack
#define DBG_CTX(x)
while ( )

Definition at line 27952 of file fortrancode.cpp.

27953  {
27954  yy_cp = (yy_c_buf_p);
27955 
27956  /* Support of fortrancodeYYtext. */
27957  *yy_cp = (yy_hold_char);
27958 
27959  /* yy_bp points to the position in yy_ch_buf of the start of
27960  * the current run.
27961  */
27962  yy_bp = yy_cp;
27963 
27964  yy_current_state = (yy_start);
27965  yy_current_state += YY_AT_BOL();
27966 
27967  (yy_state_ptr) = (yy_state_buf);
27968  *(yy_state_ptr)++ = yy_current_state;
27969 
27970 yy_match:
27971  do
27972  {
27973  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
27974  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
27975  {
27976  yy_current_state = (int) yy_def[yy_current_state];
27977  if ( yy_current_state >= 10605 )
27978  yy_c = yy_meta[(unsigned int) yy_c];
27979  }
27980  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
27981  *(yy_state_ptr)++ = yy_current_state;
27982  ++yy_cp;
27983  }
27984  while ( yy_current_state != 10604 );
27985 
27986 yy_find_action:
27987  yy_current_state = *--(yy_state_ptr);
27988  (yy_lp) = yy_accept[yy_current_state];
27989 find_rule: /* we branch to this label when backing up */
27990  for ( ; ; ) /* until we find what rule we matched */
27991  {
27992  if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
27993  {
27994  yy_act = yy_acclist[(yy_lp)];
27995  if ( yy_act & YY_TRAILING_HEAD_MASK ||
27997  {
27999  {
28002  break;
28003  }
28004  }
28005  else if ( yy_act & YY_TRAILING_MASK )
28006  {
28007  (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
28009  (yy_full_match) = yy_cp;
28011  (yy_full_lp) = (yy_lp);
28012  }
28013  else
28014  {
28015  (yy_full_match) = yy_cp;
28017  (yy_full_lp) = (yy_lp);
28018  break;
28019  }
28020  ++(yy_lp);
28021  goto find_rule;
28022  }
28023  --yy_cp;
28024  yy_current_state = *--(yy_state_ptr);
28025  (yy_lp) = yy_accept[yy_current_state];
28026  }
28027 
28029 
28030 do_action: /* This label is used only to access EOF actions. */
28031 
28032  switch ( yy_act )
28033  { /* beginning of action switch */
28034 case 1:
28035 *yy_cp = (yy_hold_char); /* undo effects of setting up fortrancodeYYtext */
28036 (yy_c_buf_p) = yy_cp = yy_bp + 4;
28037 YY_DO_BEFORE_ACTION; /* set up fortrancodeYYtext again */
28039 #line 767 "fortrancode.l"
28040 { // do not search keywords, intrinsics... TODO: complete list
28042  }
28043  YY_BREAK
28044 /*-------- inner construct ---------------------------------------------------*/
28045 case 2:
28046 /* rule 2 can match eol */
28048 #line 772 "fortrancode.l"
28049 { // highlight
28050  /* font class is defined e.g. in doxygen.css */
28051  startFontClass("keyword");
28053  endFontClass();
28054  }
28055  YY_BREAK
28056 case 3:
28057 /* rule 3 can match eol */
28059 #line 778 "fortrancode.l"
28060 {
28061  if (g_isFixedForm)
28062  {
28063  if ((yy_my_start == 1) && ((fortrancodeYYtext[0] == 'c') || (fortrancodeYYtext[0] == 'C'))) YY_FTN_REJECT;
28064  }
28065  /* font class is defined e.g. in doxygen.css */
28066  startFontClass("keywordflow");
28068  endFontClass();
28069  }
28070  YY_BREAK
28071 case 4:
28073 #line 788 "fortrancode.l"
28074 {
28075  startFontClass("keywordflow");
28077  endFontClass();
28078  }
28079  YY_BREAK
28080 case 5:
28081 /* rule 5 can match eol */
28082 *yy_cp = (yy_hold_char); /* undo effects of setting up fortrancodeYYtext */
28083 (yy_c_buf_p) = yy_cp -= 1;
28084 YY_DO_BEFORE_ACTION; /* set up fortrancodeYYtext again */
28086 #line 793 "fortrancode.l"
28087 { // list is a bit long as not all have possible end
28088  startFontClass("keywordflow");
28090  endFontClass();
28091  }
28092  YY_BREAK
28093 case 6:
28094 /* rule 6 can match eol */
28096 #line 798 "fortrancode.l"
28097 {
28098  startFontClass("keywordtype");
28100  endFontClass();
28101  }
28102  YY_BREAK
28103 case 7:
28104 *yy_cp = (yy_hold_char); /* undo effects of setting up fortrancodeYYtext */
28105 (yy_c_buf_p) = yy_cp -= 1;
28106 YY_DO_BEFORE_ACTION; /* set up fortrancodeYYtext again */
28108 #line 803 "fortrancode.l"
28109 { // Namelist specification
28110  startFontClass("keywordtype");
28112  endFontClass();
28113  }
28114  YY_BREAK
28115 /*-------- use statement -------------------------------------------*/
28116 case 8:
28118 #line 809 "fortrancode.l"
28119 {
28120  startFontClass("keywordtype");
28122  endFontClass();
28124  BEGIN(Use);
28125  }
28126  YY_BREAK
28127 case 9:
28129 #line 816 "fortrancode.l"
28130 {
28132  tmp = tmp.lower();
28136 
28137  /* append module name to use dict */
28138  useEntry = new UseEntry();
28139  //useEntry->module = fortrancodeYYtext;
28140  //useMembers->append(fortrancodeYYtext, useEntry);
28141  //addUse(fortrancodeYYtext);
28142  useEntry->module = tmp;
28143  useMembers->append(tmp, useEntry);
28144  addUse(tmp);
28145  }
28146  YY_BREAK
28147 case 10:
28149 #line 832 "fortrancode.l"
28150 { // TODO: rename
28151  startFontClass("keywordtype");
28153  endFontClass();
28155  BEGIN(UseOnly);
28156  }
28157  YY_BREAK
28158 case 11:
28160 #line 839 "fortrancode.l"
28162  YY_BREAK
28163 case 12:
28164 /* rule 12 can match eol */
28166 #line 840 "fortrancode.l"
28168  YY_BREAK
28169 case 13:
28171 #line 841 "fortrancode.l"
28172 {
28174  tmp = tmp.lower();
28175  useEntry->onlyNames.append(tmp);
28179  }
28180  YY_BREAK
28181 case 14:
28182 /* rule 14 can match eol */
28184 #line 849 "fortrancode.l"
28185 {
28188  }
28189  YY_BREAK
28190 case 15:
28192 #line 853 "fortrancode.l"
28193 {
28194  startFontClass("keywordtype");
28196  endFontClass();
28198  BEGIN(Import);
28199  }
28200  YY_BREAK
28201 case 16:
28203 #line 860 "fortrancode.l"
28204 {
28208  }
28209  YY_BREAK
28210 /*-------- fortran module -----------------------------------------*/
28211 case 17:
28212 /* rule 17 can match eol */
28214 #line 866 "fortrancode.l"
28215 { //
28216  startScope();
28217  startFontClass("keyword");
28219  endFontClass();
28221  BEGIN(ClassName);
28222  if (!qstricmp(fortrancodeYYtext,"module")) currentModule="module";
28223  }
28224  YY_BREAK
28225 case 18:
28226 /* rule 18 can match eol */
28227 *yy_cp = (yy_hold_char); /* undo effects of setting up fortrancodeYYtext */
28228 (yy_c_buf_p) = yy_cp = yy_bp + 4;
28229 YY_DO_BEFORE_ACTION; /* set up fortrancodeYYtext again */
28231 #line 875 "fortrancode.l"
28232 { //
28233  startScope();
28234  startFontClass("keyword");
28236  endFontClass();
28238  BEGIN(ClassName);
28239  currentClass="class";
28240  }
28241  YY_BREAK
28242 case 19:
28244 #line 884 "fortrancode.l"
28245 {
28246  if (currentModule == "module")
28247  {
28250  }
28252  yy_pop_state();
28253  }
28254  YY_BREAK
28255 case 20:
28256 *yy_cp = (yy_hold_char); /* undo effects of setting up fortrancodeYYtext */
28257 (yy_c_buf_p) = yy_cp -= 1;
28258 YY_DO_BEFORE_ACTION; /* set up fortrancodeYYtext again */
28260 #line 893 "fortrancode.l"
28261 { //| variable deklaration
28262  startFontClass("keyword");
28264  endFontClass();
28265  }
28266  YY_BREAK
28267 case 21:
28268 /* rule 21 can match eol */
28270 #line 898 "fortrancode.l"
28271 { // interface may be without name
28272  yy_pop_state();
28273  YY_FTN_REJECT;
28274  }
28275  YY_BREAK
28276 case 22:
28278 #line 902 "fortrancode.l"
28279 { // just reset currentClass, rest is done in following rule
28280  currentClass=0;
28281  YY_FTN_REJECT;
28282  }
28283  YY_BREAK
28284 case 23:
28286 #line 906 "fortrancode.l"
28287 { // just reset currentModule, rest is done in following rule
28288  currentModule=0;
28289  YY_FTN_REJECT;
28290  }
28291  YY_BREAK
28292 /*-------- subprog definition -------------------------------------*/
28293 case 24:
28294 /* rule 24 can match eol */
28296 #line 911 "fortrancode.l"
28297 { // TYPE_SPEC is for old function style function result
28298  startFontClass("keyword");
28300  endFontClass();
28301  }
28302  YY_BREAK
28303 case 25:
28305 #line 916 "fortrancode.l"
28306 { // Fortran subroutine or function found
28307  startFontClass("keyword");
28309  endFontClass();
28311  BEGIN(Subprog);
28312  }
28313  YY_BREAK
28314 case 26:
28316 #line 923 "fortrancode.l"
28317 { // subroutine/function name
28318  DBG_CTX((stderr, "===> start subprogram %s\n", fortrancodeYYtext));
28319  startScope();
28321  }
28322  YY_BREAK
28323 case 27:
28325 #line 928 "fortrancode.l"
28326 { // ignore rest of line
28328  }
28329  YY_BREAK
28330 case 28:
28331 /* rule 28 can match eol */
28333 #line 931 "fortrancode.l"
28335  yy_pop_state();
28336  YY_FTN_RESET
28337  }
28338  YY_BREAK
28339 case 29:
28341 #line 935 "fortrancode.l"
28342 { // Fortran subroutine or function ends
28343  //cout << "===> end function " << fortrancodeYYtext << endl;
28344  endScope();
28345  startFontClass("keyword");
28347  endFontClass();
28349  BEGIN(Subprogend);
28350  }
28351  YY_BREAK
28352 case 30:
28353 /* rule 30 can match eol */
28355 #line 944 "fortrancode.l"
28356 {
28358  yy_pop_state();
28359  }
28360  YY_BREAK
28361 case 31:
28362 /* rule 31 can match eol */
28364 #line 948 "fortrancode.l"
28365 { // Fortran subroutine or function ends
28366  //cout << "===> end function " << fortrancodeYYtext << endl;
28367  endScope();
28368  startFontClass("keyword");
28370  endFontClass();
28371  }
28372  YY_BREAK
28373 /*-------- variable declaration ----------------------------------*/
28374 case 32:
28375 /* rule 32 can match eol */
28376 *yy_cp = (yy_hold_char); /* undo effects of setting up fortrancodeYYtext */
28377 (yy_c_buf_p) = yy_cp -= 1;
28378 YY_DO_BEFORE_ACTION; /* set up fortrancodeYYtext again */
28380 #line 956 "fortrancode.l"
28381 {
28383  BEGIN(Declaration);
28384  startFontClass("keywordtype");
28386  endFontClass();
28387  }
28388  YY_BREAK
28389 case 33:
28390 /* rule 33 can match eol */
28392 #line 963 "fortrancode.l"
28393 {
28394  startFontClass("keywordtype");
28396  endFontClass();
28397  }
28398  YY_BREAK
28399 case 34:
28400 /* rule 34 can match eol */
28401 *yy_cp = (yy_hold_char); /* undo effects of setting up fortrancodeYYtext */
28402 (yy_c_buf_p) = yy_cp -= 1;
28403 YY_DO_BEFORE_ACTION; /* set up fortrancodeYYtext again */
28405 #line 968 "fortrancode.l"
28406 { //| variable deklaration
28407  startFontClass("keywordtype");
28409  endFontClass();
28410  }
28411  YY_BREAK
28412 case 35:
28414 #line 973 "fortrancode.l"
28415 { // local var
28417  {
28420  }
28421  else
28422  {
28424  }
28425  }
28426  YY_BREAK
28427 case 36:
28429 #line 984 "fortrancode.l"
28430 { // Procedure binding
28433  }
28434  YY_BREAK
28435 case 37:
28437 #line 988 "fortrancode.l"
28438 { // Type bound procedure link
28440  yy_pop_state();
28441  }
28442  YY_BREAK
28443 case 38:
28445 #line 992 "fortrancode.l"
28446 { // start of array specification
28447  bracketCount++;
28449  }
28450  YY_BREAK
28451 case 39:
28453 #line 997 "fortrancode.l"
28454 { // end array specification
28455  bracketCount--;
28457  }
28458  YY_BREAK
28459 case 40:
28461 #line 1002 "fortrancode.l"
28462 { // continuation line
28465  BEGIN(DeclContLine);
28466  }
28467  YY_BREAK
28468 case 41:
28469 /* rule 41 can match eol */
28471 #line 1007 "fortrancode.l"
28472 { // declaration not yet finished
28474  bracketCount = 0;
28475  yy_pop_state();
28476  YY_FTN_RESET
28477  }
28478  YY_BREAK
28479 case 42:
28480 /* rule 42 can match eol */
28482 #line 1013 "fortrancode.l"
28483 { // end declaration line
28484  if (g_endComment)
28485  {
28487  }
28488  else
28489  {
28491  }
28492  bracketCount = 0;
28493  yy_pop_state();
28494  YY_FTN_RESET
28495  }
28496  YY_BREAK
28497 /*-------- subprog calls -----------------------------------------*/
28498 case 43:
28500 #line 1029 "fortrancode.l"
28501 {
28502  startFontClass("keyword");
28504  endFontClass();
28506  BEGIN(SubCall);
28507  }
28508  YY_BREAK
28509 case 44:
28511 #line 1036 "fortrancode.l"
28512 { // subroutine call
28516  yy_pop_state();
28517  }
28518  YY_BREAK
28519 case 45:
28520 *yy_cp = (yy_hold_char); /* undo effects of setting up fortrancodeYYtext */
28521 (yy_c_buf_p) = yy_cp -= 1;
28522 YY_DO_BEFORE_ACTION; /* set up fortrancodeYYtext again */
28524 #line 1042 "fortrancode.l"
28525 { // function call
28526  if (g_isFixedForm && yy_my_start == 6)
28527  {
28528  // fixed form continuation line
28529  YY_FTN_REJECT;
28530  }
28531  else
28532  {
28536  }
28537  }
28538  YY_BREAK
28539 /*-------- comments ---------------------------------------------------*/
28540 case 46:
28541 /* rule 46 can match eol */
28543 #line 1057 "fortrancode.l"
28544 { // start comment line or comment block
28545  if (fortrancodeYYtext[0] == '\n')
28546  {
28547  yy_old_start = 0;
28548  yy_my_start = 1;
28550  }
28551  // Actually we should see if ! on position 6, can be continuation
28552  // but the chance is very unlikely, so no effort to solve it here
28554  BEGIN(DocBlock);
28556  }
28557  YY_BREAK
28558 case 47:
28560 #line 1070 "fortrancode.l"
28561 { // start comment line or comment block
28563  BEGIN(DocBlock);
28565  }
28566  YY_BREAK
28567 case 48:
28569 #line 1076 "fortrancode.l"
28570 { // contents of current comment line
28572  }
28573  YY_BREAK
28574 case 49:
28575 /* rule 49 can match eol */
28577 #line 1079 "fortrancode.l"
28578 { // comment block (next line is also comment line)
28579  yy_old_start = 0;
28580  yy_my_start = 1;
28582  // Actually we should see if ! on position 6, can be continuation
28583  // but the chance is very unlikely, so no effort to solve it here
28585  }
28586  YY_BREAK
28587 case 50:
28588 /* rule 50 can match eol */
28590 #line 1087 "fortrancode.l"
28591 { // comment block ends at the end of this line
28592  // remove special comment (default config)
28593  if (Config_getBool("STRIP_CODE_COMMENTS"))
28594  {
28595  g_yyLineNr+=((QCString)docBlock).contains('\n');
28596  g_yyLineNr+=1;
28597  endCodeLine();
28599  {
28600  startCodeLine();
28601  }
28603  }
28604  else // do not remove comment
28605  {
28606  startFontClass("comment");
28608  endFontClass();
28609  }
28611  yy_pop_state();
28612  YY_FTN_RESET
28613  }
28614  YY_BREAK
28615 case 51:
28616 *yy_cp = (yy_hold_char); /* undo effects of setting up fortrancodeYYtext */
28617 (yy_c_buf_p) = yy_cp -= 1;
28618 YY_DO_BEFORE_ACTION; /* set up fortrancodeYYtext again */
28620 #line 1111 "fortrancode.l"
28621 { // normal comment
28622  if(YY_START == String) YY_FTN_REJECT; // ignore in strings
28624  startFontClass("comment");
28626  endFontClass();
28627  }
28628  YY_BREAK
28629 case 52:
28631 #line 1119 "fortrancode.l"
28632 { // normal comment
28634 
28635  startFontClass("comment");
28637  endFontClass();
28638  }
28639  YY_BREAK
28640 /*------ preprocessor --------------------------------------------*/
28641 case 53:
28642 /* rule 53 can match eol */
28644 #line 1128 "fortrancode.l"
28645 {
28647  startFontClass("preprocessor");
28649  endFontClass();
28650  YY_FTN_RESET
28651  }
28652  YY_BREAK
28653 /*------ variable references? -------------------------------------*/
28654 case 54:
28656 #line 1137 "fortrancode.l"
28657 { // ignore references to elements
28659  }
28660  YY_BREAK
28661 case 55:
28663 #line 1140 "fortrancode.l"
28664 {
28668  }
28669  YY_BREAK
28670 /*------ strings --------------------------------------------------*/
28671 case 56:
28673 #line 1146 "fortrancode.l"
28674 { str+=fortrancodeYYtext; /* ignore \\ */}
28675  YY_BREAK
28676 case 57:
28678 #line 1147 "fortrancode.l"
28679 { str+=fortrancodeYYtext; /* ignore \" */}
28680  YY_BREAK
28681 case 58:
28682 /* rule 58 can match eol */
28684 #line 1149 "fortrancode.l"
28685 { // string with \n inside
28687  startFontClass("stringliteral");
28688  codifyLines(str);
28689  endFontClass();
28690  str = "";
28691  YY_FTN_RESET
28692  }
28693  YY_BREAK
28694 case 59:
28696 #line 1157 "fortrancode.l"
28697 { // string ends with next quote without previous backspace
28698  if(fortrancodeYYtext[0]!=stringStartSymbol) YY_FTN_REJECT; // single vs double quote
28700  startFontClass("stringliteral");
28701  codifyLines(str);
28702  endFontClass();
28703  yy_pop_state();
28704  }
28705  YY_BREAK
28706 case 60:
28708 #line 1165 "fortrancode.l"
28710  YY_BREAK
28711 case 61:
28713 #line 1167 "fortrancode.l"
28714 { /* string starts */
28715  /* if(YY_START == StrIgnore) YY_FTN_REJECT; // ignore in simple comments */
28718  stringStartSymbol=fortrancodeYYtext[0]; // single or double quote
28719  BEGIN(String);
28721  }
28722  YY_BREAK
28723 /*-----------------------------------------------------------------------------*/
28724 case 62:
28725 /* rule 62 can match eol */
28727 #line 1177 "fortrancode.l"
28728 {
28729  if (g_endComment)
28730  {
28732  }
28733  else
28734  {
28736  }
28737  YY_FTN_RESET
28738  }
28739  YY_BREAK
28740 case 63:
28742 #line 1188 "fortrancode.l"
28744  YY_BREAK
28745 case 64:
28747 #line 1190 "fortrancode.l"
28748 {
28750  {
28751  //yy_push_state(YY_START);
28752  //BEGIN(DocBlock);
28753  //docBlock=fortrancodeYYtext;
28754  startFontClass("comment");
28756  }
28757  else
28758  {
28760  }
28761  }
28762  YY_BREAK
28763 case 65:
28765 #line 1204 "fortrancode.l"
28766 { // Fortran logical comparison keywords
28768  }
28769  YY_BREAK
28770 case YY_STATE_EOF(INITIAL):
28771 case YY_STATE_EOF(Start):
28772 case YY_STATE_EOF(SubCall):
28773 case YY_STATE_EOF(FuncDef):
28774 case YY_STATE_EOF(ClassName):
28775 case YY_STATE_EOF(ClassVar):
28776 case YY_STATE_EOF(Subprog):
28777 case YY_STATE_EOF(DocBlock):
28778 case YY_STATE_EOF(Use):
28779 case YY_STATE_EOF(UseOnly):
28780 case YY_STATE_EOF(Import):
28781 case YY_STATE_EOF(Declaration):
28782 case YY_STATE_EOF(DeclarationBinding):
28783 case YY_STATE_EOF(DeclContLine):
28784 case YY_STATE_EOF(Parameterlist):
28785 case YY_STATE_EOF(String):
28786 case YY_STATE_EOF(Subprogend):
28787 #line 1207 "fortrancode.l"
28788 {
28789  if (YY_START == DocBlock) {
28790  if (!Config_getBool("STRIP_CODE_COMMENTS"))
28791  {
28792  startFontClass("comment");
28794  endFontClass();
28795  }
28796  }
28797  yyterminate();
28798  }
28799  YY_BREAK
28800 case 66:
28802 #line 1218 "fortrancode.l"
28803 ECHO;
28804  YY_BREAK
28805 #line 28806 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/fortrancode.cpp"
28806 
28807  case YY_END_OF_BUFFER:
28808  {
28809  /* Amount of text matched not including the EOB char. */
28810  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
28811 
28812  /* Undo the effects of YY_DO_BEFORE_ACTION. */
28813  *yy_cp = (yy_hold_char);
28815 
28816  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
28817  {
28818  /* We're scanning a new file or input source. It's
28819  * possible that this happened because the user
28820  * just pointed fortrancodeYYin at a new source and called
28821  * fortrancodeYYlex(). If so, then we have to assure
28822  * consistency between YY_CURRENT_BUFFER and our
28823  * globals. Here is the right place to do so, because
28824  * this is the first action (other than possibly a
28825  * back-up) that will match for the new input source.
28826  */
28827  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
28828  YY_CURRENT_BUFFER_LVALUE->yy_input_file = fortrancodeYYin;
28829  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
28830  }
28831 
28832  /* Note that here we test for yy_c_buf_p "<=" to the position
28833  * of the first EOB in the buffer, since yy_c_buf_p will
28834  * already have been incremented past the NUL character
28835  * (since all states make transitions on EOB to the
28836  * end-of-buffer state). Contrast this with the test
28837  * in input().
28838  */
28839  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
28840  { /* This was really a NUL. */
28841  yy_state_type yy_next_state;
28842 
28843  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
28844 
28845  yy_current_state = yy_get_previous_state( );
28846 
28847  /* Okay, we're now positioned to make the NUL
28848  * transition. We couldn't have
28849  * yy_get_previous_state() go ahead and do it
28850  * for us because it doesn't know how to deal
28851  * with the possibility of jamming (and we don't
28852  * want to build jamming into it because then it
28853  * will run more slowly).
28854  */
28855 
28856  yy_next_state = yy_try_NUL_trans( yy_current_state );
28857 
28859 
28860  if ( yy_next_state )
28861  {
28862  /* Consume the NUL. */
28863  yy_cp = ++(yy_c_buf_p);
28864  yy_current_state = yy_next_state;
28865  goto yy_match;
28866  }
28867 
28868  else
28869  {
28870  yy_cp = (yy_c_buf_p);
28871  goto yy_find_action;
28872  }
28873  }
28874 
28875  else switch ( yy_get_next_buffer( ) )
28876  {
28877  case EOB_ACT_END_OF_FILE:
28878  {
28880 
28881  if ( fortrancodeYYwrap( ) )
28882  {
28883  /* Note: because we've taken care in
28884  * yy_get_next_buffer() to have set up
28885  * fortrancodeYYtext, we can now set up
28886  * yy_c_buf_p so that if some total
28887  * hoser (like flex itself) wants to
28888  * call the scanner after we return the
28889  * YY_NULL, it'll still work - another
28890  * YY_NULL will get returned.
28891  */
28893 
28895  goto do_action;
28896  }
28897 
28898  else
28899  {
28900  if ( ! (yy_did_buffer_switch_on_eof) )
28901  YY_NEW_FILE;
28902  }
28903  break;
28904  }
28905 
28906  case EOB_ACT_CONTINUE_SCAN:
28907  (yy_c_buf_p) =
28908  (yytext_ptr) + yy_amount_of_matched_text;
28909 
28910  yy_current_state = yy_get_previous_state( );
28911 
28912  yy_cp = (yy_c_buf_p);
28914  goto yy_match;
28915 
28916  case EOB_ACT_LAST_MATCH:
28917  (yy_c_buf_p) =
28918  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
28919 
28920  yy_current_state = yy_get_previous_state( );
28921 
28922  yy_cp = (yy_c_buf_p);
28924  goto yy_find_action;
28925  }
28926  break;
28927  }
28928 
28929  default:
28931  "fatal flex scanner internal error--no action found" );
28932  } /* end of action switch */
28933  } /* end of scanning one token */
#define YY_RESTORE_YY_MORE_OFFSET
static int * yy_full_state
static yyconst flex_int16_t yy_accept[10606]
#define fortrancodeYYwrap(n)
static int yy_full_lp
static UseSDict * useMembers
info about used modules
static int bracketCount
char * fortrancodeYYtext
#define yyterminate()
#define YY_FTN_REJECT
static MemberDef * g_currentMemberDef
static char yy_hold_char
static void generateLink(CodeOutputInterface &ol, char *lname)
#define YY_FATAL_ERROR(msg)
Iterator append(const T &x)
Definition: qvaluelist.h:372
static void yy_push_state(int new_state)
#define YY_TRAILING_MASK
static QCString currentClass
name of the current enclosing class
#define Parameterlist
#define EOB_ACT_LAST_MATCH
static int yy_did_buffer_switch_on_eof
#define YY_END_OF_BUFFER
FILE * fortrancodeYYin
register char * yy_bp
#define Use
const bool FALSE
Definition: qglobal.h:370
static void yy_pop_state(void)
#define DBG_CTX(x)
static yy_state_type * yy_state_buf
static int g_yyLineNr
current line number
#define ClassName
#define YY_BUFFER_NEW
static yyconst flex_int16_t yy_chk[99369]
#define YY_START
void append(const char *key, const T *d)
Definition: sortdict.h:135
int yy_state_type
Definition: code.cpp:361
register int yy_act
static char * yy_c_buf_p
static void codifyLines(char *text)
#define YY_STATE_EOF(state)
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define YY_MORE_ADJ
static yyconst flex_int16_t yy_def[12566]
#define YY_BREAK
static int yy_get_next_buffer(void)
#define BEGIN
#define DocBlock
#define Subprogend
#define UseOnly
static int g_inputLines
number of line in the code fragment
#define EOB_ACT_CONTINUE_SCAN
#define YY_FTN_RESET
static int yy_start
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
#define YY_TRAILING_HEAD_MASK
static void addUse(const QCString &moduleName)
register char * yy_cp
#define Import
int fortrancodeYYleng
static char * yy_full_match
static yyconst flex_int16_t yy_nxt[99369]
static void startCodeLine()
int yy_old_start
static void endFontClass()
string tmp
Definition: languages.py:63
#define Config_getBool(val)
Definition: config.cpp:664
int yy_end
#define DeclarationBinding
static int yy_looking_for_trail_begin
static void endScope()
unsigned char YY_CHAR
Definition: code.cpp:357
#define YY_DO_BEFORE_ACTION
static yyconst flex_int32_t yy_meta[74]
#define Subprog
const int fixedCommentAfter
Definition: fortrancode.h:37
static bool g_insideBody
inside subprog/program body? => create links
#define YY_SC_TO_UI(c)
#define Declaration
#define ClassVar
virtual void codify(const char *s)=0
static CodeOutputInterface * g_code
contents of fortran string
QCString module
#define ECHO
static QCString currentModule
name of the current enclosing module
#define Start
#define YY_NEW_FILE
static bool g_isFixedForm
static UseEntry * useEntry
current use statement info
#define EOB_ACT_END_OF_FILE
#define SubCall
void line(double t, double *p, double &x, double &y, double &z)
#define unput(c)
static QCString docBlock
contents of all lines of a documentation block
#define YY_RULE_SETUP
static yyconst flex_int32_t yy_ec[256]
static char stringStartSymbol
#define yytext_ptr
static bool g_endComment
#define YY_AT_BOL()
static int yy_lp
static yyconst flex_int32_t yy_base[12566]
bool isFunction() const
Definition: memberdef.cpp:4160
#define DeclContLine
static yyconst flex_int16_t yy_acclist[6342]
static void startScope()
QCString lower() const
Definition: qcstring.cpp:263
#define INITIAL
static yy_state_type yy_get_previous_state(void)
#define FuncDef
static int yy_n_chars
#define YY_CURRENT_BUFFER_LVALUE
#define YY_BUFFER_NORMAL
const bool TRUE
Definition: qglobal.h:371
static QCString str
static yy_state_type * yy_state_ptr
static void addLocalVar(const QCString &varName)
static void endCodeLine()
QStringList onlyNames
static void startFontClass(const char *s)
int yy_my_start
static void writeMultiLineCodeLink ( CodeOutputInterface ol,
Definition d,
const char *  text 
)
static

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

Definition at line 27331 of file fortrancode.cpp.

27333 {
27334  static bool sourceTooltips = Config_getBool("SOURCE_TOOLTIPS");
27336  QCString ref = d->getReference();
27338  QCString anchor = d->anchor();
27339  QCString tooltip;
27340  if (!sourceTooltips) // fall back to simple "title" tooltips
27341  {
27342  tooltip = d->briefDescriptionAsTooltip();
27343  }
27344  bool done=FALSE;
27345  char *p=(char *)text;
27346  while (!done)
27347  {
27348  char *sp=p;
27349  char c;
27350  while ((c=*p++) && c!='\n') { }
27351  if (c=='\n')
27352  {
27353  g_yyLineNr++;
27354  *(p-1)='\0';
27355  //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
27356  ol.writeCodeLink(ref,file,anchor,sp,tooltip);
27357  endCodeLine();
27358  if (g_yyLineNr<g_inputLines)
27359  {
27360  startCodeLine();
27361  }
27362  }
27363  else
27364  {
27365  //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
27366  ol.writeCodeLink(ref,file,anchor,sp,tooltip);
27367  done=TRUE;
27368  }
27369  }
27370 }
virtual QCString getReference() const
void addTooltip(Definition *d)
Definition: tooltip.cpp:71
const bool FALSE
Definition: qglobal.h:370
static int g_yyLineNr
current line number
virtual QCString getOutputFileBase() const =0
static int g_inputLines
number of line in the code fragment
virtual void writeCodeLink(const char *ref, const char *file, const char *anchor, const char *name, const char *tooltip)=0
static void startCodeLine()
p
Definition: test.py:223
#define Config_getBool(val)
Definition: config.cpp:664
static TooltipManager * instance()
Definition: tooltip.cpp:45
QCString briefDescriptionAsTooltip() const
const bool TRUE
Definition: qglobal.h:371
virtual QCString anchor() const =0
static void endCodeLine()
static void yy_fatal_error ( yyconst char  msg[])
static
static void yy_fatal_error ( yyconst char *  msg)
static

Definition at line 29602 of file fortrancode.cpp.

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

Definition at line 28943 of file fortrancode.cpp.

28944 {
28945  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
28946  register char *source = (yytext_ptr);
28947  register int number_to_move, i;
28948  int ret_val;
28949 
28950  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
28952  "fatal flex scanner internal error--end of buffer missed" );
28953 
28954  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
28955  { /* Don't try to fill the buffer, so this is an EOF. */
28956  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
28957  {
28958  /* We matched a single character, the EOB, so
28959  * treat this as a final EOF.
28960  */
28961  return EOB_ACT_END_OF_FILE;
28962  }
28963 
28964  else
28965  {
28966  /* We matched some text prior to the EOB, first
28967  * process it.
28968  */
28969  return EOB_ACT_LAST_MATCH;
28970  }
28971  }
28972 
28973  /* Try to read more data. */
28974 
28975  /* First move last chars to start of buffer. */
28976  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
28977 
28978  for ( i = 0; i < number_to_move; ++i )
28979  *(dest++) = *(source++);
28980 
28981  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
28982  /* don't do the read, it's not guaranteed to return an EOF,
28983  * just force an EOF
28984  */
28985  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
28986 
28987  else
28988  {
28989  int num_to_read =
28990  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
28991 
28992  while ( num_to_read <= 0 )
28993  { /* Not enough room in the buffer - grow it. */
28994 
28996 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
28997 
28998  }
28999 
29000  if ( num_to_read > YY_READ_BUF_SIZE )
29001  num_to_read = YY_READ_BUF_SIZE;
29002 
29003  /* Read in more data. */
29004  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
29005  (yy_n_chars), (size_t) num_to_read );
29006 
29007  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
29008  }
29009 
29010  if ( (yy_n_chars) == 0 )
29011  {
29012  if ( number_to_move == YY_MORE_ADJ )
29013  {
29014  ret_val = EOB_ACT_END_OF_FILE;
29016  }
29017 
29018  else
29019  {
29020  ret_val = EOB_ACT_LAST_MATCH;
29021  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
29023  }
29024  }
29025 
29026  else
29027  ret_val = EOB_ACT_CONTINUE_SCAN;
29028 
29029  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
29030  /* Extend the array by 50%, plus the number we really need. */
29031  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
29032  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) fortrancodeYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
29033  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
29034  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
29035  }
29036 
29037  (yy_n_chars) += number_to_move;
29040 
29041  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
29042 
29043  return ret_val;
29044 }
void fortrancodeYYrestart(FILE *input_file)
#define YY_READ_BUF_SIZE
#define YY_FATAL_ERROR(msg)
#define YY_END_OF_BUFFER_CHAR
#define EOB_ACT_LAST_MATCH
FILE * fortrancodeYYin
static char * yy_c_buf_p
#define YY_MORE_ADJ
#define YY_BUFFER_EOF_PENDING
#define EOB_ACT_CONTINUE_SCAN
void * fortrancodeYYrealloc(void *, yy_size_t)
#define YY_INPUT(buf, result, max_size)
#define EOB_ACT_END_OF_FILE
#define yytext_ptr
static int yy_n_chars
#define YY_CURRENT_BUFFER_LVALUE
size_t yy_size_t
Definition: code.cpp:203
static yy_state_type yy_get_previous_state ( void  )
static

Definition at line 29048 of file fortrancode.cpp.

29049 {
29050  register yy_state_type yy_current_state;
29051  register char *yy_cp;
29052 
29053  yy_current_state = (yy_start);
29054  yy_current_state += YY_AT_BOL();
29055 
29056  (yy_state_ptr) = (yy_state_buf);
29057  *(yy_state_ptr)++ = yy_current_state;
29058 
29059  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
29060  {
29061  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
29062  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
29063  {
29064  yy_current_state = (int) yy_def[yy_current_state];
29065  if ( yy_current_state >= 10605 )
29066  yy_c = yy_meta[(unsigned int) yy_c];
29067  }
29068  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
29069  *(yy_state_ptr)++ = yy_current_state;
29070  }
29071 
29072  return yy_current_state;
29073 }
static yy_state_type * yy_state_buf
static yyconst flex_int16_t yy_chk[99369]
int yy_state_type
Definition: code.cpp:361
static char * yy_c_buf_p
#define YY_MORE_ADJ
static yyconst flex_int16_t yy_def[12566]
static int yy_start
register char * yy_cp
static yyconst flex_int16_t yy_nxt[99369]
unsigned char YY_CHAR
Definition: code.cpp:357
static yyconst flex_int32_t yy_meta[74]
#define YY_SC_TO_UI(c)
static yyconst flex_int32_t yy_ec[256]
#define yytext_ptr
#define YY_AT_BOL()
static yyconst flex_int32_t yy_base[12566]
static yy_state_type * yy_state_ptr
static int yy_init_globals ( void  )
static

Definition at line 29705 of file fortrancode.cpp.

29706 {
29707  /* Initialization is the same as for the non-reentrant scanner.
29708  * This function is called from fortrancodeYYlex_destroy(), so don't allocate here.
29709  */
29710 
29711  (yy_buffer_stack) = 0;
29712  (yy_buffer_stack_top) = 0;
29713  (yy_buffer_stack_max) = 0;
29714  (yy_c_buf_p) = (char *) 0;
29715  (yy_init) = 0;
29716  (yy_start) = 0;
29717 
29718  (yy_start_stack_ptr) = 0;
29719  (yy_start_stack_depth) = 0;
29720  (yy_start_stack) = NULL;
29721 
29722  (yy_state_buf) = 0;
29723  (yy_state_ptr) = 0;
29724  (yy_full_match) = 0;
29725  (yy_lp) = 0;
29726 
29727 /* Defined in main.c */
29728 #ifdef YY_STDINIT
29729  fortrancodeYYin = stdin;
29731 #else
29732  fortrancodeYYin = (FILE *) 0;
29733  fortrancodeYYout = (FILE *) 0;
29734 #endif
29735 
29736  /* For future reference: Set errno on error, since we are called by
29737  * fortrancodeYYlex_init()
29738  */
29739  return 0;
29740 }
static size_t yy_buffer_stack_top
FILE * fortrancodeYYin
static size_t yy_buffer_stack_max
static int yy_start_stack_depth
static yy_state_type * yy_state_buf
static char * yy_c_buf_p
static int yy_start
static char * yy_full_match
static YY_BUFFER_STATE * yy_buffer_stack
FILE * fortrancodeYYout
static int yy_init
static int yy_lp
static int * yy_start_stack
static int yy_start_stack_ptr
static yy_state_type * yy_state_ptr
static void yy_pop_state ( void  )
static

Definition at line 29585 of file fortrancode.cpp.

29586 {
29587  if ( --(yy_start_stack_ptr) < 0 )
29588  YY_FATAL_ERROR( "start-condition stack underflow" );
29589 
29591 }
#define YY_FATAL_ERROR(msg)
#define BEGIN
static int * yy_start_stack
static int yy_start_stack_ptr
static void yy_push_state ( int  new_state)
static

Definition at line 29561 of file fortrancode.cpp.

29562 {
29564  {
29565  yy_size_t new_size;
29566 
29568  new_size = (yy_start_stack_depth) * sizeof( int );
29569 
29570  if ( ! (yy_start_stack) )
29571  (yy_start_stack) = (int *) fortrancodeYYalloc(new_size );
29572 
29573  else
29574  (yy_start_stack) = (int *) fortrancodeYYrealloc((void *) (yy_start_stack),new_size );
29575 
29576  if ( ! (yy_start_stack) )
29577  YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
29578  }
29579 
29581 
29582  BEGIN(new_state);
29583 }
#define YY_FATAL_ERROR(msg)
#define YY_START_STACK_INCR
static int yy_start_stack_depth
#define YY_START
#define BEGIN
void * fortrancodeYYrealloc(void *, yy_size_t)
void * fortrancodeYYalloc(yy_size_t)
static int * yy_start_stack
size_t yy_size_t
Definition: code.cpp:203
static int yy_start_stack_ptr
static int yy_top_state ( void  )
static

Definition at line 29593 of file fortrancode.cpp.

29594 {
29595  return (yy_start_stack)[(yy_start_stack_ptr) - 1];
29596 }
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 29080 of file fortrancode.cpp.

29081 {
29082  register int yy_is_jam;
29083 
29084  register YY_CHAR yy_c = 1;
29085  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
29086  {
29087  yy_current_state = (int) yy_def[yy_current_state];
29088  if ( yy_current_state >= 10605 )
29089  yy_c = yy_meta[(unsigned int) yy_c];
29090  }
29091  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
29092  yy_is_jam = (yy_current_state == 10604);
29093  if ( ! yy_is_jam )
29094  *(yy_state_ptr)++ = yy_current_state;
29095 
29096  return yy_is_jam ? 0 : yy_current_state;
29097 }
static yyconst flex_int16_t yy_chk[99369]
static yyconst flex_int16_t yy_def[12566]
static yyconst flex_int16_t yy_nxt[99369]
unsigned char YY_CHAR
Definition: code.cpp:357
static yyconst flex_int32_t yy_meta[74]
static yyconst flex_int32_t yy_base[12566]
static yy_state_type * yy_state_ptr
static int yyread ( char *  buf,
int  max_size 
)
static

Definition at line 27671 of file fortrancode.cpp.

27672 {
27673  int c=0;
27674  while( c < max_size && g_inputString[g_inputPosition] )
27675  {
27676  *buf = g_inputString[g_inputPosition++] ;
27677  c++; buf++;
27678  }
27679  return c;
27680 }
static int g_inputPosition
read offset during parsing
static const char * g_inputString
the code fragment as text
static void yyunput ( int  c,
char *  buf_ptr 
)
static
static void yyunput ( int  c,
register char *  yy_bp 
)
static

Definition at line 29099 of file fortrancode.cpp.

29100 {
29101  register char *yy_cp;
29102 
29103  yy_cp = (yy_c_buf_p);
29104 
29105  /* undo effects of setting up fortrancodeYYtext */
29106  *yy_cp = (yy_hold_char);
29107 
29108  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
29109  { /* need to shift things up to make room */
29110  /* +2 for EOB chars. */
29111  register int number_to_move = (yy_n_chars) + 2;
29112  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
29113  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
29114  register char *source =
29115  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
29116 
29117  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
29118  *--dest = *--source;
29119 
29120  yy_cp += (int) (dest - source);
29121  yy_bp += (int) (dest - source);
29122  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
29123  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
29124 
29125  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
29126  YY_FATAL_ERROR( "flex scanner push-back overflow" );
29127  }
29128 
29129  *--yy_cp = (char) c;
29130 
29131  (yytext_ptr) = yy_bp;
29132  (yy_hold_char) = *yy_cp;
29133  (yy_c_buf_p) = yy_cp;
29134 }
static char yy_hold_char
#define YY_FATAL_ERROR(msg)
register char * yy_bp
static char * yy_c_buf_p
register char * yy_cp
if(!(yy_init))
#define yytext_ptr
static int yy_n_chars
#define YY_CURRENT_BUFFER_LVALUE

Variable Documentation

int bracketCount = 0
static

Definition at line 27130 of file fortrancode.cpp.

QCString currentClass =0
static

name of the current enclosing class

Definition at line 27093 of file fortrancode.cpp.

QCString currentModule =0
static

name of the current enclosing module

Definition at line 27092 of file fortrancode.cpp.

QCString docBlock
static

contents of all lines of a documentation block

Definition at line 27091 of file fortrancode.cpp.

int fortrancodeYY_flex_debug = 0

Definition at line 26952 of file fortrancode.cpp.

FILE * fortrancodeYYin = (FILE *) 0

Definition at line 359 of file fortrancode.cpp.

int fortrancodeYYleng

Definition at line 294 of file fortrancode.cpp.

int fortrancodeYYlineno = 1

Definition at line 365 of file fortrancode.cpp.

FILE * fortrancodeYYout = (FILE *) 0

Definition at line 359 of file fortrancode.cpp.

char * fortrancodeYYtext

Definition at line 26976 of file fortrancode.cpp.

CodeOutputInterface* g_code
static

contents of fortran string

Definition at line 27100 of file fortrancode.cpp.

bool g_collectXRefs
static

Definition at line 27112 of file fortrancode.cpp.

Definition* g_currentDefinition
static

Definition at line 27123 of file fortrancode.cpp.

const char* g_currentFontClass
static

Definition at line 27116 of file fortrancode.cpp.

MemberDef* g_currentMemberDef
static

Definition at line 27124 of file fortrancode.cpp.

bool g_endComment
static

Definition at line 27132 of file fortrancode.cpp.

bool g_exampleBlock
static

Definition at line 27118 of file fortrancode.cpp.

QCString g_exampleFile
static

Definition at line 27120 of file fortrancode.cpp.

QCString g_exampleName
static

Definition at line 27119 of file fortrancode.cpp.

bool g_includeCodeFragment
static

Definition at line 27125 of file fortrancode.cpp.

int g_inputLines
static

number of line in the code fragment

Definition at line 27108 of file fortrancode.cpp.

int g_inputPosition
static

read offset during parsing

Definition at line 27107 of file fortrancode.cpp.

const char* g_inputString
static

the code fragment as text

Definition at line 27106 of file fortrancode.cpp.

bool g_insideBody
static

inside subprog/program body? => create links

Definition at line 27115 of file fortrancode.cpp.

bool g_isFixedForm
static

Definition at line 27113 of file fortrancode.cpp.

bool g_needsTermination
static

Definition at line 27110 of file fortrancode.cpp.

QCString g_parmName
static

Definition at line 27104 of file fortrancode.cpp.

QCString g_parmType
static

Definition at line 27103 of file fortrancode.cpp.

Definition* g_searchCtx
static

Definition at line 27111 of file fortrancode.cpp.

FileDef* g_sourceFileDef
static

Definition at line 27122 of file fortrancode.cpp.

int g_yyLineNr
static

current line number

Definition at line 27109 of file fortrancode.cpp.

QList<Scope> scopeStack
static

Definition at line 27096 of file fortrancode.cpp.

QCString str =""
static

Definition at line 27098 of file fortrancode.cpp.

char stringStartSymbol
static

Definition at line 27127 of file fortrancode.cpp.

UseEntry* useEntry = 0
static

current use statement info

Definition at line 27095 of file fortrancode.cpp.

UseSDict* useMembers = new UseSDict
static

info about used modules

Definition at line 27094 of file fortrancode.cpp.

yyconst flex_int16_t yy_accept[10606]
static

Definition at line 1096 of file fortrancode.cpp.

yyconst flex_int16_t yy_acclist[6342]
static

Definition at line 394 of file fortrancode.cpp.

register int yy_act

Definition at line 27910 of file fortrancode.cpp.

yyconst flex_int32_t yy_base[12566]
static

Definition at line 2311 of file fortrancode.cpp.

register char * yy_bp

Definition at line 27909 of file fortrancode.cpp.

YY_BUFFER_STATE* yy_buffer_stack = 0
static

Stack as an array.

Definition at line 274 of file fortrancode.cpp.

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 273 of file fortrancode.cpp.

size_t yy_buffer_stack_top = 0
static

index of top of stack.

Definition at line 272 of file fortrancode.cpp.

char* yy_c_buf_p = (char *) 0
static

Definition at line 297 of file fortrancode.cpp.

yyconst flex_int16_t yy_chk[99369]
static

Definition at line 16017 of file fortrancode.cpp.

register char* yy_cp

Definition at line 27909 of file fortrancode.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 27907 of file fortrancode.cpp.

yyconst flex_int16_t yy_def[12566]
static

Definition at line 3697 of file fortrancode.cpp.

int yy_did_buffer_switch_on_eof
static

Definition at line 304 of file fortrancode.cpp.

yyconst flex_int32_t yy_ec[256]
static

Definition at line 2267 of file fortrancode.cpp.

int yy_end = 1

Definition at line 27047 of file fortrancode.cpp.

int yy_full_lp
static

Definition at line 26958 of file fortrancode.cpp.

char* yy_full_match
static

Definition at line 26955 of file fortrancode.cpp.

int* yy_full_state
static

Definition at line 26959 of file fortrancode.cpp.

char yy_hold_char
static

Definition at line 292 of file fortrancode.cpp.

int yy_init = 0
static

Definition at line 298 of file fortrancode.cpp.

int yy_looking_for_trail_begin = 0
static

Definition at line 26957 of file fortrancode.cpp.

int yy_lp
static

Definition at line 26956 of file fortrancode.cpp.

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

Definition at line 2299 of file fortrancode.cpp.

int yy_my_start = 0

Definition at line 27046 of file fortrancode.cpp.

int yy_n_chars
static

Definition at line 293 of file fortrancode.cpp.

yyconst flex_int16_t yy_nxt[99369]
static

Definition at line 5083 of file fortrancode.cpp.

int yy_old_start = 0

Definition at line 27045 of file fortrancode.cpp.

int yy_start = 0
static

Definition at line 299 of file fortrancode.cpp.

int* yy_start_stack = NULL
static

Definition at line 27798 of file fortrancode.cpp.

int yy_start_stack_depth = 0
static

Definition at line 27797 of file fortrancode.cpp.

int yy_start_stack_ptr = 0
static

Definition at line 27796 of file fortrancode.cpp.

yy_state_type* yy_state_buf =0
static

Definition at line 26954 of file fortrancode.cpp.

yy_state_type * yy_state_ptr =0
static

Definition at line 26954 of file fortrancode.cpp.