Commit 69124e6c authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release_1.1.0-20000305

parent f4f3f167
DOXYGEN Version 1.1.0-20000227 DOXYGEN Version 1.1.0-20000305
CONTENTS CONTENTS
-------- --------
...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX: ...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have: 1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.0-20000227.src.tar.gz # uncompress the archive gunzip doxygen-1.1.0-20000305.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.0-20000227.src.tar # unpack it tar xf doxygen-1.1.0-20000305.src.tar # unpack it
2. Run the configure script: 2. Run the configure script:
...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at ...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (27 February 2000) Dimitri van Heesch (05 March 2000)
...@@ -10,10 +10,17 @@ clean: FORCE ...@@ -10,10 +10,17 @@ clean: FORCE
-rm -f objects/*.o -rm -f objects/*.o
distclean: clean distclean: clean
cd examples ; $(MAKE) clean
cd doc ; $(MAKE) clean
cd src ; $(MAKE) distclean
-rm -f bin/doxy*
-rm -f html
-rm -f objects/*.o
-rm -f src/Makefile.doxygen \ -rm -f src/Makefile.doxygen \
src/Makefile.doxytag \ src/Makefile.doxytag \
src/Makefile.doxysearch src/Makefile.doxysearch
-rm -f Makefile src/Makefile examples/Makefile doc/Makefile -rm -f Makefile src/Makefile examples/Makefile doc/Makefile
-rm -f .makeconfig .tmakeconfig
-rm -f src/doxygen.pro src/doxytag.pro src/doxysearch.pro -rm -f src/doxygen.pro src/doxytag.pro src/doxysearch.pro
-rm -f src/version.cpp -rm -f src/version.cpp
......
DOXYGEN Version 1.1.0-20000227 DOXYGEN Version 1.1.0-20000305
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (27 February 2000) Dimitri van Heesch (05 March 2000)
1.1.0-20000227 1.1.0-20000305
...@@ -32,7 +32,7 @@ tmake: ...@@ -32,7 +32,7 @@ tmake:
$(PERL) $(TMAKE) doxytag.pro >Makefile.doxytag $(PERL) $(TMAKE) doxytag.pro >Makefile.doxytag
$(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch
clean: clean: Makefile.doxygen Makefile.doxytag Makefile.doxysearch
$(MAKE) -f Makefile.doxygen clean $(MAKE) -f Makefile.doxygen clean
$(MAKE) -f Makefile.doxytag clean $(MAKE) -f Makefile.doxytag clean
$(MAKE) -f Makefile.doxysearch clean $(MAKE) -f Makefile.doxysearch clean
......
#define yy_create_buffer cppExpYY_create_buffer
#define yy_delete_buffer cppExpYY_delete_buffer
#define yy_scan_buffer cppExpYY_scan_buffer
#define yy_scan_string cppExpYY_scan_string
#define yy_scan_bytes cppExpYY_scan_bytes
#define yy_flex_debug cppExpYY_flex_debug
#define yy_init_buffer cppExpYY_init_buffer
#define yy_flush_buffer cppExpYY_flush_buffer
#define yy_load_buffer_state cppExpYY_load_buffer_state
#define yy_switch_to_buffer cppExpYY_switch_to_buffer
#define yyin cppExpYYin
#define yyleng cppExpYYleng
#define yylex cppExpYYlex
#define yyout cppExpYYout
#define yyrestart cppExpYYrestart
#define yytext cppExpYYtext
#define yywrap cppExpYYwrap
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 33
#define YY_END_OF_BUFFER 34
static yyconst short int yy_accept[62] =
{ 0,
0, 0, 34, 31, 32, 22, 20, 7, 31, 23,
24, 18, 16, 17, 31, 19, 26, 27, 2, 10,
31, 11, 1, 6, 5, 21, 8, 4, 0, 0,
29, 29, 26, 0, 0, 26, 0, 27, 27, 14,
12, 9, 13, 15, 3, 25, 0, 0, 0, 0,
29, 29, 0, 30, 28, 0, 0, 29, 30, 28,
0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 4, 5, 1, 1, 6, 7, 8, 9,
10, 11, 12, 1, 13, 14, 15, 16, 17, 17,
17, 17, 17, 17, 17, 18, 18, 19, 1, 20,
21, 22, 23, 1, 24, 24, 24, 24, 25, 26,
1, 1, 1, 1, 1, 27, 1, 1, 1, 1,
1, 1, 1, 1, 28, 1, 1, 29, 1, 1,
1, 30, 1, 31, 1, 1, 32, 32, 24, 24,
25, 33, 1, 1, 1, 1, 1, 27, 1, 5,
1, 1, 1, 5, 1, 5, 28, 5, 1, 34,
1, 1, 1, 35, 1, 36, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[37] =
{ 0,
1, 2, 2, 1, 1, 1, 1, 2, 1, 1,
1, 1, 1, 1, 1, 3, 3, 3, 1, 1,
1, 1, 1, 3, 3, 3, 1, 1, 1, 1,
1, 3, 3, 1, 1, 1
} ;
static yyconst short int yy_base[65] =
{ 0,
0, 0, 130, 163, 163, 88, 163, 92, 65, 163,
163, 163, 163, 163, 21, 163, 26, 47, 163, 25,
57, 26, 163, 163, 38, 163, 163, 163, 41, 71,
90, 40, 33, 52, 68, 55, 0, 0, 63, 163,
163, 163, 163, 163, 163, 163, 51, 94, 0, 80,
163, 0, 102, 108, 86, 44, 111, 126, 163, 94,
163, 159, 47, 38
} ;
static yyconst short int yy_def[65] =
{ 0,
61, 1, 61, 61, 61, 61, 61, 61, 62, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 62, 61,
61, 31, 17, 61, 61, 61, 63, 18, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 64, 61,
61, 32, 61, 61, 63, 64, 61, 61, 61, 61,
0, 61, 61, 61
} ;
static yyconst short int yy_nxt[200] =
{ 0,
4, 5, 4, 6, 4, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 18, 19, 20,
21, 22, 23, 4, 4, 4, 4, 4, 4, 4,
24, 4, 4, 4, 25, 26, 31, 31, 31, 32,
56, 33, 33, 34, 40, 41, 43, 44, 46, 55,
35, 46, 36, 36, 37, 52, 52, 52, 46, 37,
32, 61, 38, 38, 38, 32, 61, 34, 34, 34,
61, 35, 45, 39, 39, 47, 35, 42, 47, 53,
53, 36, 36, 54, 54, 54, 48, 48, 48, 39,
39, 57, 57, 47, 30, 58, 58, 58, 28, 49,
47, 46, 47, 47, 49, 31, 31, 31, 27, 48,
48, 48, 60, 60, 50, 51, 51, 54, 54, 54,
60, 60, 51, 54, 54, 54, 58, 58, 58, 61,
61, 61, 61, 59, 59, 61, 61, 61, 61, 61,
59, 58, 58, 58, 61, 61, 61, 61, 61, 61,
61, 51, 51, 61, 61, 61, 61, 61, 51, 29,
61, 29, 3, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61
} ;
static yyconst short int yy_chk[200] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 15, 15, 15, 17,
64, 17, 17, 17, 20, 20, 22, 22, 29, 63,
17, 56, 17, 17, 17, 32, 32, 32, 47, 17,
18, 33, 18, 18, 18, 34, 33, 34, 34, 34,
29, 18, 25, 18, 18, 30, 34, 21, 30, 35,
35, 36, 36, 35, 35, 35, 30, 30, 30, 39,
39, 50, 50, 30, 9, 50, 50, 50, 8, 30,
30, 48, 30, 30, 30, 31, 31, 31, 6, 48,
48, 48, 55, 55, 31, 31, 31, 53, 53, 53,
60, 60, 31, 54, 54, 54, 57, 57, 57, 3,
0, 0, 0, 54, 54, 0, 0, 0, 0, 0,
54, 58, 58, 58, 0, 0, 0, 0, 0, 0,
0, 58, 58, 0, 0, 0, 0, 0, 58, 62,
0, 62, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "constexp.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#line 19 "constexp.l"
#include "constexp.h"
#include "cppvalue.h"
#include "ce_parse.h" // generated header file
#define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1
QCString strToken;
static const char *inputString;
static int inputPosition;
CPPValue resultValue;
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
static int yyread(char *buf,int max_size)
{
int c=0;
while( c < max_size && inputString[inputPosition] )
{
*buf = inputString[inputPosition++] ;
c++; buf++;
}
return c;
}
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 49 "constexp.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 62 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 163 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
#line 51 "constexp.l"
{ return TOK_QUESTIONMARK; }
YY_BREAK
case 2:
YY_RULE_SETUP
#line 52 "constexp.l"
{ return TOK_COLON; }
YY_BREAK
case 3:
YY_RULE_SETUP
#line 53 "constexp.l"
{ return TOK_OR; }
YY_BREAK
case 4:
YY_RULE_SETUP
#line 54 "constexp.l"
{ return TOK_AND; }
YY_BREAK
case 5:
YY_RULE_SETUP
#line 55 "constexp.l"
{ return TOK_BITWISEOR; }
YY_BREAK
case 6:
YY_RULE_SETUP
#line 56 "constexp.l"
{ return TOK_BITWISEXOR; }
YY_BREAK
case 7:
YY_RULE_SETUP
#line 57 "constexp.l"
{ return TOK_AMPERSAND; }
YY_BREAK
case 8:
YY_RULE_SETUP
#line 58 "constexp.l"
{ return TOK_NOTEQUAL; }
YY_BREAK
case 9:
YY_RULE_SETUP
#line 59 "constexp.l"
{ return TOK_EQUAL; }
YY_BREAK
case 10:
YY_RULE_SETUP
#line 60 "constexp.l"
{ return TOK_LESSTHAN; }
YY_BREAK
case 11:
YY_RULE_SETUP
#line 61 "constexp.l"
{ return TOK_GREATERTHAN; }
YY_BREAK
case 12:
YY_RULE_SETUP
#line 62 "constexp.l"
{ return TOK_LESSTHANOREQUALTO; }
YY_BREAK
case 13:
YY_RULE_SETUP
#line 63 "constexp.l"
{ return TOK_GREATERTHANOREQUALTO; }
YY_BREAK
case 14:
YY_RULE_SETUP
#line 64 "constexp.l"
{ return TOK_SHIFTLEFT; }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 65 "constexp.l"
{ return TOK_SHIFTRIGHT; }
YY_BREAK
case 16:
YY_RULE_SETUP
#line 66 "constexp.l"
{ return TOK_PLUS; }
YY_BREAK
case 17:
YY_RULE_SETUP
#line 67 "constexp.l"
{ return TOK_MINUS; }
YY_BREAK
case 18:
YY_RULE_SETUP
#line 68 "constexp.l"
{ return TOK_STAR; }
YY_BREAK
case 19:
YY_RULE_SETUP
#line 69 "constexp.l"
{ return TOK_DIVIDE; }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 70 "constexp.l"
{ return TOK_MOD; }
YY_BREAK
case 21:
YY_RULE_SETUP
#line 71 "constexp.l"
{ return TOK_TILDE; }
YY_BREAK
case 22:
YY_RULE_SETUP
#line 72 "constexp.l"
{ return TOK_NOT; }
YY_BREAK
case 23:
YY_RULE_SETUP
#line 73 "constexp.l"
{ return TOK_LPAREN; }
YY_BREAK
case 24:
YY_RULE_SETUP
#line 74 "constexp.l"
{ return TOK_RPAREN; }
YY_BREAK
case 25:
YY_RULE_SETUP
#line 75 "constexp.l"
{
strToken=yytext;
return TOK_CHARACTER;
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 79 "constexp.l"
{ strToken=yytext;
return TOK_OCTALINT;
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 82 "constexp.l"
{ strToken=yytext;
return TOK_DECIMALINT;
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 85 "constexp.l"
{ strToken=yytext; return TOK_HEXADECIMALINT; }
YY_BREAK
case 29:
YY_RULE_SETUP
#line 86 "constexp.l"
{
strToken=yytext; return TOK_FLOAT;
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 89 "constexp.l"
{
strToken=yytext; return TOK_FLOAT;
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 92 "constexp.l"
YY_BREAK
case 32:
YY_RULE_SETUP
#line 93 "constexp.l"
YY_BREAK
case 33:
YY_RULE_SETUP
#line 95 "constexp.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 62 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 62 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 61);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 95 "constexp.l"
bool parseCppExpression(const QCString &s)
{
//printf("Expression: `%s'\n",s.data());
inputString = s;
inputPosition = 0;
cppExpYYrestart( cppExpYYin );
cppExpYYparse();
//printf("Result: %ld\n",(long)resultValue);
return (long)resultValue!=0;
}
extern "C" {
int cppExpYYwrap() { return 1; }
}
/* A Bison parser, made from constexp.y
by GNU Bison version 1.25
*/
#define YYBISON 1 /* Identify Bison output. */
#define yyparse cppExpYYparse
#define yylex cppExpYYlex
#define yyerror cppExpYYerror
#define yylval cppExpYYlval
#define yychar cppExpYYchar
#define yydebug cppExpYYdebug
#define yynerrs cppExpYYnerrs
#define TOK_QUESTIONMARK 258
#define TOK_COLON 259
#define TOK_OR 260
#define TOK_AND 261
#define TOK_BITWISEOR 262
#define TOK_BITWISEXOR 263
#define TOK_AMPERSAND 264
#define TOK_NOTEQUAL 265
#define TOK_EQUAL 266
#define TOK_LESSTHAN 267
#define TOK_GREATERTHAN 268
#define TOK_LESSTHANOREQUALTO 269
#define TOK_GREATERTHANOREQUALTO 270
#define TOK_SHIFTLEFT 271
#define TOK_SHIFTRIGHT 272
#define TOK_PLUS 273
#define TOK_MINUS 274
#define TOK_STAR 275
#define TOK_DIVIDE 276
#define TOK_MOD 277
#define TOK_TILDE 278
#define TOK_NOT 279
#define TOK_LPAREN 280
#define TOK_RPAREN 281
#define TOK_OCTALINT 282
#define TOK_DECIMALINT 283
#define TOK_HEXADECIMALINT 284
#define TOK_CHARACTER 285
#define TOK_FLOAT 286
#include "cppvalue.h"
#include "constexp.h"
#if defined(_MSC_VER)
#define MSDOS
#endif
#define YYSTYPE CPPValue
#include <stdio.h>
#include <stdlib.h>
int cppExpYYerror(const char *s)
{
printf("ERROR: %s\n",s);
return 0;
}
int cppExpYYlex();
#ifndef YYSTYPE
#define YYSTYPE int
#endif
#include <stdio.h>
#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif
#define YYFINAL 73
#define YYFLAG -32768
#define YYNTBASE 32
#define YYTRANSLATE(x) ((unsigned)(x) <= 286 ? yytranslate[x] : 47)
static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31
};
#if YYDEBUG != 0
static const short yyprhs[] = { 0,
0, 2, 4, 10, 12, 16, 18, 22, 24, 28,
30, 34, 36, 40, 42, 46, 50, 52, 56, 60,
64, 68, 70, 74, 78, 80, 84, 88, 90, 94,
98, 102, 104, 107, 110, 113, 116, 118, 122, 124,
126, 128, 130
};
static const short yyrhs[] = { 33,
0, 34, 0, 34, 3, 34, 4, 34, 0, 35,
0, 34, 5, 35, 0, 36, 0, 35, 6, 36,
0, 37, 0, 36, 7, 37, 0, 38, 0, 37,
8, 38, 0, 39, 0, 38, 9, 39, 0, 40,
0, 39, 11, 40, 0, 39, 10, 40, 0, 41,
0, 40, 12, 41, 0, 40, 13, 41, 0, 40,
14, 41, 0, 40, 15, 41, 0, 42, 0, 41,
16, 42, 0, 41, 17, 42, 0, 43, 0, 42,
18, 43, 0, 42, 19, 43, 0, 44, 0, 43,
20, 44, 0, 43, 21, 44, 0, 43, 22, 44,
0, 45, 0, 18, 44, 0, 19, 44, 0, 23,
44, 0, 24, 44, 0, 46, 0, 25, 33, 26,
0, 27, 0, 28, 0, 29, 0, 30, 0, 31,
0
};
#endif
#if YYDEBUG != 0
static const short yyrline[] = { 0,
74, 78, 80, 89, 91, 97, 99, 105, 107, 114,
116, 122, 124, 130, 132, 136, 142, 144, 148, 152,
157, 164, 166, 170, 176, 178, 189, 202, 204, 215,
228, 236, 238, 240, 247, 251, 257, 259, 263, 265,
267, 269, 271
};
#endif
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
static const char * const yytname[] = { "$","error","$undefined.","TOK_QUESTIONMARK",
"TOK_COLON","TOK_OR","TOK_AND","TOK_BITWISEOR","TOK_BITWISEXOR","TOK_AMPERSAND",
"TOK_NOTEQUAL","TOK_EQUAL","TOK_LESSTHAN","TOK_GREATERTHAN","TOK_LESSTHANOREQUALTO",
"TOK_GREATERTHANOREQUALTO","TOK_SHIFTLEFT","TOK_SHIFTRIGHT","TOK_PLUS","TOK_MINUS",
"TOK_STAR","TOK_DIVIDE","TOK_MOD","TOK_TILDE","TOK_NOT","TOK_LPAREN","TOK_RPAREN",
"TOK_OCTALINT","TOK_DECIMALINT","TOK_HEXADECIMALINT","TOK_CHARACTER","TOK_FLOAT",
"start","constant_expression","logical_or_expression","logical_and_expression",
"inclusive_or_expression","exclusive_or_expression","and_expression","equality_expression",
"relational_expression","shift_expression","additive_expression","multiplicative_expression",
"unary_expression","primary_expression","constant", NULL
};
#endif
static const short yyr1[] = { 0,
32, 33, 33, 34, 34, 35, 35, 36, 36, 37,
37, 38, 38, 39, 39, 39, 40, 40, 40, 40,
40, 41, 41, 41, 42, 42, 42, 43, 43, 43,
43, 44, 44, 44, 44, 44, 45, 45, 46, 46,
46, 46, 46
};
static const short yyr2[] = { 0,
1, 1, 5, 1, 3, 1, 3, 1, 3, 1,
3, 1, 3, 1, 3, 3, 1, 3, 3, 3,
3, 1, 3, 3, 1, 3, 3, 1, 3, 3,
3, 1, 2, 2, 2, 2, 1, 3, 1, 1,
1, 1, 1
};
static const short yydefact[] = { 0,
0, 0, 0, 0, 0, 39, 40, 41, 42, 43,
1, 2, 4, 6, 8, 10, 12, 14, 17, 22,
25, 28, 32, 37, 33, 34, 35, 36, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 38, 0,
5, 7, 9, 11, 13, 16, 15, 18, 19, 20,
21, 23, 24, 26, 27, 29, 30, 31, 0, 3,
0, 0, 0
};
static const short yydefgoto[] = { 71,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24
};
static const short yypact[] = { -13,
-13, -13, -13, -13, -13,-32768,-32768,-32768,-32768,-32768,
-32768, 4, 2, 20, 27, 31, 21, 7, 17, 18,
8,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 24, -13,
-13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
-13, -13, -13, -13, -13, -13, -13, -13,-32768, 34,
2, 20, 27, 31, 21, 7, 7, 17, 17, 17,
17, 18, 18, 8, 8,-32768,-32768,-32768, -13, 39,
13, 51,-32768
};
static const short yypgoto[] = {-32768,
47, -26, 25, 23, 26, 28, 22, 5, -15, 6,
9, -1,-32768,-32768
};
#define YYLAST 62
static const short yytable[] = { 25,
26, 27, 28, 50, 1, 2, 30, 32, 31, 3,
4, 5, 72, 6, 7, 8, 9, 10, 38, 39,
40, 41, 58, 59, 60, 61, 33, 46, 47, 48,
36, 37, 42, 43, 34, 44, 45, 69, 31, 35,
56, 57, 70, 31, 66, 67, 68, 62, 63, 49,
73, 29, 64, 65, 52, 51, 55, 0, 53, 0,
0, 54
};
static const short yycheck[] = { 1,
2, 3, 4, 30, 18, 19, 3, 6, 5, 23,
24, 25, 0, 27, 28, 29, 30, 31, 12, 13,
14, 15, 38, 39, 40, 41, 7, 20, 21, 22,
10, 11, 16, 17, 8, 18, 19, 4, 5, 9,
36, 37, 69, 5, 46, 47, 48, 42, 43, 26,
0, 5, 44, 45, 32, 31, 35, -1, 33, -1,
-1, 34
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || defined (__alpha)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
#pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc. */
#endif /* not GNU C. */
#endif /* alloca not defined. */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
as one case of the switch. */
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT return(0)
#define YYABORT return(1)
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(token, value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ yychar = (token), yylval = (value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
#ifndef YYPURE
#define YYLEX yylex()
#endif
#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif
/* If nonreentrant, generate the variables here */
#ifndef YYPURE
int yychar; /* the lookahead symbol */
YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
#ifdef YYLSP_NEEDED
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
#endif
int yynerrs; /* number of parse errors so far */
#endif /* not YYPURE */
#if YYDEBUG != 0
int yydebug; /* nonzero means print parse trace */
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
/* YYINITDEPTH indicates the initial size of the parser's stacks */
#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif
/* YYMAXDEPTH is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
#ifndef YYPARSE_RETURN_TYPE
#define YYPARSE_RETURN_TYPE int
#endif
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
YYPARSE_RETURN_TYPE yyparse (void);
#endif
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
#ifndef __cplusplus
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (to, from, count)
char *to;
char *from;
int count;
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#else /* __cplusplus */
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (char *to, char *from, int count)
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#endif
#endif
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */
YYPARSE_RETURN_TYPE
yyparse(YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
short yyssa[YYINITDEPTH]; /* the state stack */
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
#ifdef YYLSP_NEEDED
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK (yyvsp--, yyssp--)
#endif
int yystacksize = YYINITDEPTH;
#ifdef YYPURE
int yychar;
YYSTYPE yylval;
int yynerrs;
#ifdef YYLSP_NEEDED
YYLTYPE yylloc;
#endif
#endif
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int yylen;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Starting parse\n");
#endif
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss - 1;
yyvsp = yyvs;
#ifdef YYLSP_NEEDED
yylsp = yyls;
#endif
/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
yynewstate:
*++yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Give user a chance to reallocate the stack */
/* Use copies of these so that the &'s don't force the real ones into memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
#endif
/* Get the current used size of the three stacks, in elements. */
int size = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
#ifdef YYLSP_NEEDED
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yyls1, size * sizeof (*yylsp),
&yystacksize);
#else
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yystacksize);
#endif
yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
yyls = yyls1;
#endif
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
{
yyerror("parser stack overflow");
return 2;
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
__yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
__yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
__yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
yylsp = yyls + size - 1;
#endif
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Entering state %d\n", yystate);
#endif
goto yybackup;
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Reading a token: ");
#endif
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Now at end of input.\n");
#endif
}
else
{
yychar1 = YYTRANSLATE(yychar);
#if YYDEBUG != 0
if (yydebug)
{
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise meaning
of a token, for further debugging info. */
#ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
#endif
fprintf (stderr, ")\n");
}
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* count tokens shifted since error; after three, turn off error status. */
if (yyerrstatus) yyerrstatus--;
yystate = yyn;
goto yynewstate;
/* Do the default action for the current state. */
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
yylen = yyr2[yyn];
if (yylen > 0)
yyval = yyvsp[1-yylen]; /* implement default value of the action */
#if YYDEBUG != 0
if (yydebug)
{
int i;
fprintf (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
switch (yyn) {
case 1:
{ resultValue = yyvsp[0]; return 0; ;
break;}
case 2:
{ yyval = yyvsp[0]; ;
break;}
case 3:
{
bool c = (yyvsp[-4].isInt() ? ((long)yyvsp[-4] != 0) : ((double)yyvsp[-4] != 0.0));
yyval = c ? yyvsp[-2] : yyvsp[0];
;
break;}
case 4:
{ yyval = yyvsp[0]; ;
break;}
case 5:
{
yyval = CPPValue( (long)((long)yyvsp[-2] || (long)yyvsp[0]) );
;
break;}
case 6:
{ yyval = yyvsp[0]; ;
break;}
case 7:
{
yyval = CPPValue( (long)((long)yyvsp[-2] && (long)yyvsp[0]) );
;
break;}
case 8:
{ yyval = yyvsp[0]; ;
break;}
case 9:
{
yyval = CPPValue( (long)yyvsp[-2] | (long)yyvsp[0] );
;
break;}
case 10:
{ yyval = yyvsp[0]; ;
break;}
case 11:
{
yyval = CPPValue( (long)yyvsp[-2] ^ (long)yyvsp[0] );
;
break;}
case 12:
{ yyval = yyvsp[0]; ;
break;}
case 13:
{
yyval = CPPValue( (long)yyvsp[-2] & (long)yyvsp[0] );
;
break;}
case 14:
{ yyval = yyvsp[0]; ;
break;}
case 15:
{
yyval = CPPValue( (long)((double)yyvsp[-2] == (double)yyvsp[0]) );
;
break;}
case 16:
{
yyval = CPPValue( (long)((double)yyvsp[-2] != (double)yyvsp[0]) );
;
break;}
case 17:
{ yyval = yyvsp[0]; ;
break;}
case 18:
{
yyval = CPPValue( (long)((double)yyvsp[-2] < (double)yyvsp[0]) );
;
break;}
case 19:
{
yyval = CPPValue( (long)((double)yyvsp[-2] > (double)yyvsp[0]) );
;
break;}
case 20:
{
yyval = CPPValue( (long)((double)yyvsp[-2] <= (double)yyvsp[0]) );
;
break;}
case 21:
{
yyval = CPPValue( (long)((double)yyvsp[-2] >= (double)yyvsp[0]) );
;
break;}
case 22:
{ yyval = yyvsp[0]; ;
break;}
case 23:
{
yyval = CPPValue( (long)yyvsp[-2] << (long)yyvsp[0] );
;
break;}
case 24:
{
yyval = CPPValue( (long)yyvsp[-2] >> (long)yyvsp[0] );
;
break;}
case 25:
{ yyval = yyvsp[0]; ;
break;}
case 26:
{
if (!yyvsp[-2].isInt() || !yyvsp[0].isInt())
{
yyval = CPPValue( (double)yyvsp[-2] + (double)yyvsp[0] );
}
else
{
yyval = CPPValue( (long)yyvsp[-2] + (long)yyvsp[0] );
}
;
break;}
case 27:
{
if (!yyvsp[-2].isInt() || !yyvsp[0].isInt())
{
yyval = CPPValue( (double)yyvsp[-2] - (double)yyvsp[0] );
}
else
{
yyval = CPPValue( (long)yyvsp[-2] - (long)yyvsp[0] );
}
;
break;}
case 28:
{ yyval = yyvsp[0]; ;
break;}
case 29:
{
if (!yyvsp[-2].isInt() || !yyvsp[0].isInt())
{
yyval = CPPValue( (double)yyvsp[-2] * (double)yyvsp[0] );
}
else
{
yyval = CPPValue( (long)yyvsp[-2] * (long)yyvsp[0] );
}
;
break;}
case 30:
{
if (!yyvsp[-2].isInt() || !yyvsp[0].isInt())
{
yyval = CPPValue( (double)yyvsp[-2] / (double)yyvsp[0] );
}
else
{
long value = yyvsp[0];
if (value==0) value=1;
yyval = CPPValue( (long)yyvsp[-2] / value );
}
;
break;}
case 31:
{
long value = yyvsp[0];
if (value==0) value=1;
yyval = CPPValue( (long)yyvsp[-2] % value );
;
break;}
case 32:
{ yyval = yyvsp[0]; ;
break;}
case 33:
{ yyval = yyvsp[-1]; ;
break;}
case 34:
{
if (yyvsp[0].isInt())
yyval = CPPValue(-(long)yyvsp[0]);
else
yyval = CPPValue(-(double)yyvsp[0]);
;
break;}
case 35:
{
yyval = CPPValue(~(long)yyvsp[0]);
;
break;}
case 36:
{
yyval = CPPValue((long)!(long)yyvsp[0]);
;
break;}
case 37:
{ yyval = yyvsp[0]; ;
break;}
case 38:
{ yyval = yyvsp[-1]; ;
break;}
case 39:
{ yyval = parseOctal(); ;
break;}
case 40:
{ yyval = parseDecimal(); ;
break;}
case 41:
{ yyval = parseHexadecimal(); ;
break;}
case 42:
{ yyval = parseCharacter(); ;
break;}
case 43:
{ yyval = parseFloat(); ;
break;}
}
/* the action file gets copied in in place of this dollarsign */
yyvsp -= yylen;
yyssp -= yylen;
#ifdef YYLSP_NEEDED
yylsp -= yylen;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#ifdef YYLSP_NEEDED
yylsp++;
if (yylen == 0)
{
yylsp->first_line = yylloc.first_line;
yylsp->first_column = yylloc.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
#endif
/* Now "shift" the result of the reduction.
Determine what state that goes to,
based on the state we popped back to
and the rule number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
yyerrlab: /* here on detecting error */
if (! yyerrstatus)
/* If not already recovering from an error, report this error. */
{
++yynerrs;
#ifdef YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
int size = 0;
char *msg;
int x, count;
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) malloc(size + 15);
if (msg != 0)
{
strcpy(msg, "parse error");
if (count < 5)
{
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
{
strcat(msg, count == 0 ? ", expecting `" : " or `");
strcat(msg, yytname[x]);
strcat(msg, "'");
count++;
}
}
yyerror(msg);
free(msg);
}
else
yyerror ("parse error; also virtual memory exceeded");
}
else
#endif /* YYERROR_VERBOSE */
yyerror("parse error");
}
goto yyerrlab1;
yyerrlab1: /* here on error raised explicitly by an action */
if (yyerrstatus == 3)
{
/* if just tried and failed to reuse lookahead token after an error, discard it. */
/* return failure if at end of input */
if (yychar == YYEOF)
YYABORT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token
after shifting the error token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
goto yyerrhandle;
yyerrdefault: /* current state does not do anything special for the error token. */
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) goto yydefault;
#endif
yyerrpop: /* pop the current state because it cannot handle the error token */
if (yyssp == yyss) YYABORT;
yyvsp--;
yystate = *--yyssp;
#ifdef YYLSP_NEEDED
yylsp--;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting error token, ");
#endif
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
}
...@@ -314,11 +314,13 @@ static void writeInheritanceSpecifier(OutputList &ol,BaseClassDef *bcd) ...@@ -314,11 +314,13 @@ static void writeInheritanceSpecifier(OutputList &ol,BaseClassDef *bcd)
void ClassDef::setIncludeFile(FileDef *fd,const char *incName,bool local) void ClassDef::setIncludeFile(FileDef *fd,const char *incName,bool local)
{ {
//printf("ClassDef::setInclude(%p,%s,%d)\n",fd,incName,local);
if (!incInfo) incInfo=new IncludeInfo; if (!incInfo) incInfo=new IncludeInfo;
if ((incName && incInfo->includeName.isEmpty()) || if ((incName && incInfo->includeName.isEmpty()) ||
(fd!=0 && incInfo->fileDef==0) (fd!=0 && incInfo->fileDef==0)
) )
{ {
//printf("Setting file info\n");
incInfo->fileDef = fd; incInfo->fileDef = fd;
incInfo->includeName = incName; incInfo->includeName = incName;
incInfo->local = local; incInfo->local = local;
...@@ -1396,7 +1398,7 @@ void ClassDef::determineImplUsageRelation() ...@@ -1396,7 +1398,7 @@ void ClassDef::determineImplUsageRelation()
{ {
ClassDef *cd=getClass(name()+"::"+type.mid(i,l)); ClassDef *cd=getClass(name()+"::"+type.mid(i,l));
if (cd==0) cd=getClass(type.mid(i,l)); // TODO: also try inbetween scopes! if (cd==0) cd=getClass(type.mid(i,l)); // TODO: also try inbetween scopes!
if (cd && cd->isLinkable()) // class exists and is linkable if (cd /*&& cd->isLinkable()*/) // class exists and is linkable
{ {
found=TRUE; found=TRUE;
if (usesImplClassDict==0) usesImplClassDict = new UsesClassDict(257); if (usesImplClassDict==0) usesImplClassDict = new UsesClassDict(257);
......
...@@ -218,7 +218,7 @@ class BaseClassList : public QList<BaseClassDef> ...@@ -218,7 +218,7 @@ class BaseClassList : public QList<BaseClassDef>
if (c1==0 || c2==0) if (c1==0 || c2==0)
return FALSE; return FALSE;
else else
return strcmp(c1->name(),c2->name()); return strcasecmp(c1->name(),c2->name());
} }
}; };
......
...@@ -34,7 +34,7 @@ int ClassList::compareItems(GCI item1, GCI item2) ...@@ -34,7 +34,7 @@ int ClassList::compareItems(GCI item1, GCI item2)
//int prefixLength = Config::ignorePrefix.length(); //int prefixLength = Config::ignorePrefix.length();
//int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; //int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
//int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; //int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
return strcmp(c1->name().data()+getPrefixIndex(c1->name()), return strcasecmp(c1->name().data()+getPrefixIndex(c1->name()),
c2->name().data()+getPrefixIndex(c2->name()) c2->name().data()+getPrefixIndex(c2->name())
); );
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
#define yy_create_buffer declinfoYY_create_buffer
#define yy_delete_buffer declinfoYY_delete_buffer
#define yy_scan_buffer declinfoYY_scan_buffer
#define yy_scan_string declinfoYY_scan_string
#define yy_scan_bytes declinfoYY_scan_bytes
#define yy_flex_debug declinfoYY_flex_debug
#define yy_init_buffer declinfoYY_init_buffer
#define yy_flush_buffer declinfoYY_flush_buffer
#define yy_load_buffer_state declinfoYY_load_buffer_state
#define yy_switch_to_buffer declinfoYY_switch_to_buffer
#define yyin declinfoYYin
#define yyleng declinfoYYleng
#define yylex declinfoYYlex
#define yyout declinfoYYout
#define yyrestart declinfoYYrestart
#define yytext declinfoYYtext
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
#define yywrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 22
#define YY_END_OF_BUFFER 23
static yyconst short int yy_accept[89] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
23, 20, 21, 5, 4, 8, 7, 20, 10, 2,
9, 2, 20, 13, 11, 12, 18, 18, 20, 20,
21, 16, 20, 19, 5, 8, 7, 0, 10, 9,
4, 0, 6, 3, 2, 2, 0, 2, 0, 0,
0, 16, 0, 0, 16, 0, 0, 0, 3, 2,
0, 0, 15, 0, 0, 2, 0, 0, 2, 0,
0, 14, 2, 0, 17, 2, 1, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 1, 1, 1, 1, 4, 1, 5,
6, 7, 1, 1, 1, 1, 1, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 9, 1, 10,
1, 11, 1, 1, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
13, 1, 1, 1, 12, 1, 14, 12, 12, 12,
15, 12, 12, 16, 12, 12, 12, 12, 12, 12,
17, 18, 12, 19, 12, 20, 12, 12, 21, 12,
12, 12, 1, 1, 1, 22, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[23] =
{ 0,
1, 2, 1, 1, 1, 1, 1, 3, 1, 1,
1, 4, 1, 4, 4, 4, 4, 4, 4, 4,
4, 1
} ;
static yyconst short int yy_base[97] =
{ 0,
164, 163, 0, 0, 20, 22, 21, 23, 42, 51,
162, 161, 160, 159, 158, 157, 156, 155, 154, 153,
155, 168, 168, 60, 30, 33, 168, 145, 168, 0,
168, 135, 150, 168, 168, 168, 168, 130, 53, 62,
66, 36, 75, 168, 0, 44, 168, 111, 168, 168,
32, 72, 168, 112, 0, 93, 105, 0, 75, 73,
79, 168, 88, 86, 95, 98, 100, 101, 85, 63,
42, 107, 168, 39, 111, 35, 27, 55, 9, 90,
113, 168, 11, 117, 168, 8, 0, 168, 122, 126,
130, 134, 138, 140, 143, 147
} ;
static yyconst short int yy_def[97] =
{ 0,
89, 89, 88, 3, 90, 90, 91, 91, 92, 92,
89, 89, 89, 89, 89, 89, 89, 89, 93, 93,
88, 88, 88, 88, 88, 88, 88, 88, 88, 94,
88, 94, 95, 88, 88, 88, 88, 88, 96, 96,
96, 88, 96, 88, 24, 88, 88, 88, 88, 88,
88, 88, 88, 88, 94, 94, 95, 94, 88, 96,
96, 88, 96, 96, 88, 88, 88, 96, 88, 94,
88, 88, 88, 88, 96, 94, 88, 88, 94, 88,
88, 88, 94, 88, 88, 94, 94, 0, 88, 88,
88, 88, 88, 88, 88, 88
} ;
static yyconst short int yy_nxt[191] =
{ 0,
22, 24, 23, 25, 26, 27, 25, 22, 28, 29,
22, 30, 31, 30, 30, 30, 32, 30, 30, 30,
30, 33, 23, 23, 23, 23, 87, 86, 83, 35,
36, 35, 36, 51, 52, 51, 51, 66, 51, 53,
38, 67, 38, 40, 41, 52, 42, 80, 79, 78,
53, 43, 40, 41, 61, 42, 81, 62, 77, 82,
43, 45, 63, 64, 46, 47, 65, 61, 48, 49,
62, 63, 50, 52, 61, 63, 61, 62, 53, 62,
61, 76, 63, 62, 63, 68, 69, 64, 63, 61,
65, 84, 62, 71, 85, 63, 66, 63, 68, 66,
67, 72, 75, 67, 73, 62, 57, 70, 72, 74,
63, 73, 75, 69, 81, 62, 74, 82, 84, 54,
63, 85, 22, 22, 22, 22, 34, 34, 34, 34,
37, 37, 37, 37, 39, 39, 39, 39, 44, 44,
44, 44, 55, 55, 58, 59, 58, 60, 60, 60,
60, 57, 56, 54, 88, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 21, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88
} ;
static yyconst short int yy_chk[191] =
{ 0,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 5, 7, 6, 8, 86, 83, 79, 5,
5, 6, 6, 25, 26, 51, 25, 42, 51, 26,
7, 42, 8, 9, 9, 46, 9, 77, 76, 74,
46, 9, 10, 10, 39, 10, 78, 39, 71, 78,
10, 24, 39, 40, 24, 24, 40, 41, 24, 24,
41, 40, 24, 52, 60, 41, 43, 60, 52, 43,
61, 70, 60, 61, 43, 43, 69, 64, 61, 63,
64, 80, 63, 59, 80, 64, 65, 63, 63, 66,
65, 67, 68, 66, 67, 68, 57, 56, 72, 67,
68, 72, 75, 54, 81, 75, 72, 81, 84, 48,
75, 84, 89, 89, 89, 89, 90, 90, 90, 90,
91, 91, 91, 91, 92, 92, 92, 92, 93, 93,
93, 93, 94, 94, 95, 38, 95, 96, 96, 96,
96, 33, 32, 28, 21, 20, 19, 18, 17, 16,
15, 14, 13, 12, 11, 2, 1, 88, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 88
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "declinfo.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#line 18 "declinfo.l"
/*
* includes
*/
#include <stdio.h>
#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include "declinfo.h"
#include "util.h"
#define YY_NO_UNPUT
/* -----------------------------------------------------------------
*
* statics
*/
static const char * inputString;
static int inputPosition;
static QCString scope;
static QCString className;
static QCString classTempList;
static QCString funcTempList;
static QCString type;
static QCString name;
static QCString args;
static QCString tmpType;
static int sharpCount;
static bool classTempListFound;
static bool funcTempListFound;
static QCString exceptionString;
static void addType()
{
//printf("addType() type=`%s' scope=`%s' name=`%s'\n",
// type.data(),scope.data(),name.data());
if (name.isEmpty() && scope.isEmpty()) return;
if (!type.isEmpty()) type+=' ';
if (!scope.isEmpty()) type+=scope+"::";
type+=name;
scope.resize(0);
name.resize(0);
}
static void addTypeName()
{
//printf("addTypeName() type=`%s' scope=`%s' name=`%s'\n",
// type.data(),scope.data(),name.data());
if (name.isEmpty()) return;
if (!type.isEmpty()) type+=' ';
type+=name;
name.resize(0);
}
#define YY_NEVER_INTERACTIVE 1
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
static int yyread(char *buf,int max_size)
{
int c=0;
while( c < max_size && inputString[inputPosition] )
{
*buf = inputString[inputPosition++] ;
c++; buf++;
}
return c;
}
#define Start 1
#define Template 2
#define ReadArgs 3
#define Operator 4
#define FuncPtr 5
#define EndTemplate 6
#define StripTempArgs 7
#define SkipSharp 8
#define ReadExceptions 9
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 110 "declinfo.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 89 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 168 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
#line 112 "declinfo.l"
{ // operator rule must be before {ID} rule
name += yytext;
BEGIN(Operator);
}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 116 "declinfo.l"
{
addTypeName();
name += yytext;
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 120 "declinfo.l"
{ // found a scope specifier
if (!scope.isEmpty())
{
scope+="::"+name; // add name to scope
}
else
{
scope = name.copy(); // scope becomes name
}
name.resize(0);
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 131 "declinfo.l"
{
addType();
type+=yytext;
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 135 "declinfo.l"
{
addType();
}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 138 "declinfo.l"
{
addType();
type+="(*";
}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 142 "declinfo.l"
{
type+=")";
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 145 "declinfo.l"
{ // TODO: function pointers
args+="(";
BEGIN(ReadArgs);
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 149 "declinfo.l"
{
args+="[";
BEGIN(ReadArgs);
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 153 "declinfo.l"
{
name+="<";
sharpCount=0;
BEGIN(Template);
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 158 "declinfo.l"
{
name+="<";
sharpCount++;
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 162 "declinfo.l"
{
name+=">";
if (sharpCount)
--sharpCount;
else
{
BEGIN(Start);
}
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 171 "declinfo.l"
{
name+=*yytext;
}
YY_BREAK
case 14:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 174 "declinfo.l"
{
name+="() <>";
BEGIN(ReadArgs);
}
YY_BREAK
case 15:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 178 "declinfo.l"
{
name+="()";
BEGIN(ReadArgs);
}
YY_BREAK
case 16:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 182 "declinfo.l"
{
name+=yytext;
BEGIN(ReadArgs);
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 186 "declinfo.l"
{
exceptionString="throw(";
BEGIN(ReadExceptions);
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 190 "declinfo.l"
{
args+=*yytext;
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 193 "declinfo.l"
{
exceptionString+=*yytext;
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 196 "declinfo.l"
YY_BREAK
case 21:
YY_RULE_SETUP
#line 197 "declinfo.l"
YY_BREAK
case 22:
YY_RULE_SETUP
#line 199 "declinfo.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Start):
case YY_STATE_EOF(Template):
case YY_STATE_EOF(ReadArgs):
case YY_STATE_EOF(Operator):
case YY_STATE_EOF(FuncPtr):
case YY_STATE_EOF(EndTemplate):
case YY_STATE_EOF(StripTempArgs):
case YY_STATE_EOF(SkipSharp):
case YY_STATE_EOF(ReadExceptions):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 89 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 89 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 88);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 199 "declinfo.l"
/*@ ----------------------------------------------------------------------------
*/
void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t,
QCString &n,QCString &a,QCString &ftl,QCString &exc)
{
inputString = decl;
//printf("Input=`%s'\n",inputString);
if (inputString==0) return;
inputPosition = 0;
classTempListFound = FALSE;
funcTempListFound = FALSE;
scope.resize(0);
className.resize(0);
classTempList.resize(0);
funcTempList.resize(0);
name.resize(0);
type.resize(0);
args.resize(0);
exceptionString.resize(0);
// first we try to find the type, scope, name and arguments
declinfoYYrestart( declinfoYYin );
BEGIN( Start );
declinfoYYlex();
cl=scope.copy();
//printf("scope=`%s'\n",scope.data());
int il=0,ir=0;
if ((il=cl.find('<'))!=-1 && (ir=cl.findRev('>'))!=-1) // split up scope and template arguments
{
ctl=removeRedundantWhiteSpace(cl.mid(il,ir-il+1));
cl=cl.left(il)+cl.right(cl.length()-ir-1);
}
//printf("cl=`%s' ctl=`%s'\n",cl.data(),ctl.data());
n=removeRedundantWhiteSpace(name);
if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1)
// TODO: handle cases like where n="operator<< <T>"
{
ftl=removeRedundantWhiteSpace(n.right(n.length()-il));
n=n.left(il);
}
//ctl=classTempList.copy();
//ftl=funcTempList.copy();
t=removeRedundantWhiteSpace(type);
a=removeRedundantWhiteSpace(args);
exc=removeRedundantWhiteSpace(exceptionString);
if (!t.isEmpty() && t.at(t.length()-1)==')')
{
a.prepend(")");
t=t.left(t.length()-1);
}
//printf("type=`%s' class=`%s' name=`%s' args=`%s'\n",
// t.data(),cl.data(),n.data(),a.data());
return;
}
//extern "C" { // some bogus code to keep the compiler happy
// int declinfoYYwrap() { return 1 ; }
// void declinfoYYdummy() { yy_flex_realloc(0,0); }
//}
#if 0
void dumpDecl(const char *s)
{
QCString className;
QCString classTNames;
QCString type;
QCString name;
QCString args;
QCString funcTNames;
printf("-----------------------------------------\n");
parseFuncDecl(s,className,classTNames,type,name,args,funcTNames);
printf("type=`%s' class=`%s' classTempl=`%s' name=`%s' "
"funcTemplateNames=`%s' args=`%s'\n",
type.data(),className.data(),classTNames.data(),
name.data(),funcTNames.data(),args.data()
);
}
// some test code
int main()
{
dumpDecl("A < T > :: Value * A < T > :: getValue < S > ( const A < T > & a )");
dumpDecl("const A<T>::Value* A<T>::getValue<S>(const A<T>&a)");
dumpDecl("func()");
dumpDecl("friend void bla<>()");
dumpDecl("name< T > :: operator () (int bla)");
dumpDecl("name< T > :: operator << (int bla)");
dumpDecl("name< T > :: operator << <> (int bla)");
dumpDecl("className::func()");
dumpDecl("void ( * Name < T > :: bla ) ( int, char * )");
}
#endif
#define yy_create_buffer defargsYY_create_buffer
#define yy_delete_buffer defargsYY_delete_buffer
#define yy_scan_buffer defargsYY_scan_buffer
#define yy_scan_string defargsYY_scan_string
#define yy_scan_bytes defargsYY_scan_bytes
#define yy_flex_debug defargsYY_flex_debug
#define yy_init_buffer defargsYY_init_buffer
#define yy_flush_buffer defargsYY_flush_buffer
#define yy_load_buffer_state defargsYY_load_buffer_state
#define yy_switch_to_buffer defargsYY_switch_to_buffer
#define yyin defargsYYin
#define yyleng defargsYYleng
#define yylex defargsYYlex
#define yyout defargsYYout
#define yyrestart defargsYYrestart
#define yytext defargsYYtext
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
#define YY_USES_REJECT
#define yywrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 41
#define YY_END_OF_BUFFER 42
static yyconst short int yy_acclist[184] =
{ 0,
2, 2, 42, 40, 41, 39, 41, 40, 41, 1,
40, 41, 26, 40, 41, 20, 26, 40, 41, 26,
40, 41, 26, 40, 41, 28, 40, 41, 13, 28,
40, 41, 14, 28, 40, 41, 28, 40, 41, 27,
28, 40, 41, 15, 28, 40, 41, 16, 28, 40,
41, 18, 28, 40, 41, 17, 28, 40, 41, 25,
40, 41, 2, 25, 40, 41, 12, 25, 40, 41,
23, 25, 40, 41, 25, 40, 41, 12, 25, 40,
41, 21, 25, 40, 41, 24, 25, 40, 41, 25,
40, 41, 7, 26, 40, 41, 26, 40, 41, 12,
26, 40, 41, 23, 26, 40, 41, 11, 25, 40,
41, 9, 24, 25, 40, 41, 40, 41, 40, 41,
40, 41, 32, 37, 40, 41, 36, 39, 41, 37,
40, 41, 32, 37, 40, 41, 33, 40, 41, 35,
39, 41, 33, 40, 41, 19, 27, 2,16392, 24,
3, 10, 9, 24, 31, 32, 34, 32, 33, 33,
33, 38,16392, 8200, 6, 6, 32, 38, 33, 38,
38, 8200, 5, 4, 5, 32, 38, 33, 38, 22,
4, 29, 30
} ;
static yyconst short int yy_accept[135] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 2, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 4, 6, 8,
10, 13, 16, 20, 23, 26, 29, 33, 37, 40,
44, 48, 52, 56, 60, 63, 67, 71, 75, 78,
82, 86, 90, 93, 97, 100, 104, 108, 112, 117,
119, 121, 123, 127, 130, 133, 137, 140, 143, 146,
146, 146, 147, 148, 149, 149, 149, 150, 150, 150,
151, 151, 152, 152, 152, 152, 153, 155, 155, 156,
156, 156, 157, 158, 159, 160, 161, 162, 163, 163,
163, 163, 164, 165, 165, 165, 166, 166, 167, 167,
167, 167, 169, 171, 172, 172, 173, 173, 174, 176,
176, 176, 176, 178, 180, 181, 182, 182, 183, 183,
183, 183, 184, 184
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 4, 5, 1, 1, 1, 6, 7, 8,
9, 10, 1, 11, 1, 1, 12, 13, 14, 14,
14, 14, 14, 14, 14, 15, 15, 16, 1, 17,
18, 19, 1, 1, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
21, 22, 23, 1, 20, 1, 24, 20, 25, 20,
26, 20, 20, 20, 27, 20, 20, 28, 20, 29,
30, 20, 20, 20, 31, 32, 20, 33, 20, 20,
20, 20, 34, 1, 35, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[36] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 3, 4,
1, 1, 5, 5, 5, 3, 1, 1, 1, 5,
1, 1, 1, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 1, 1
} ;
static yyconst short int yy_base[149] =
{ 0,
0, 1, 2, 3, 4, 18, 40, 0, 0, 0,
68, 71, 73, 75, 109, 0, 142, 0, 174, 205,
145, 155, 15, 19, 5, 21, 287, 363, 363, 22,
363, 363, 363, 25, 0, 363, 363, 363, 26, 0,
363, 363, 363, 363, 363, 284, 87, 84, 82, 363,
363, 0, 258, 363, 258, 363, 89, 96, 0, 26,
249, 248, 0, 363, 265, 90, 0, 363, 150, 95,
152, 363, 0, 274, 150, 169, 237, 153, 162, 0,
252, 363, 267, 177, 179, 363, 0, 180, 363, 244,
244, 0, 363, 185, 0, 205, 206, 243, 210, 240,
238, 186, 269, 209, 212, 363, 248, 244, 214, 219,
222, 225, 206, 363, 239, 0, 205, 363, 363, 245,
188, 179, 0, 0, 363, 363, 188, 363, 142, 140,
120, 363, 363, 302, 307, 312, 317, 322, 327, 103,
332, 90, 337, 342, 73, 347, 352, 357
} ;
static yyconst short int yy_def[149] =
{ 0,
134, 134, 134, 134, 135, 135, 133, 7, 7, 7,
7, 7, 7, 7, 133, 15, 135, 17, 136, 136,
134, 134, 137, 137, 138, 138, 133, 133, 133, 133,
133, 133, 133, 133, 139, 133, 133, 133, 133, 140,
133, 133, 133, 133, 133, 133, 141, 133, 133, 133,
133, 142, 143, 133, 144, 133, 133, 133, 145, 133,
133, 133, 146, 133, 133, 146, 147, 133, 147, 133,
133, 133, 140, 133, 141, 141, 141, 133, 133, 142,
143, 133, 133, 148, 133, 133, 145, 133, 133, 133,
133, 146, 133, 146, 147, 147, 147, 133, 141, 133,
141, 77, 141, 133, 133, 133, 133, 133, 133, 133,
133, 146, 147, 133, 141, 103, 133, 133, 133, 133,
133, 133, 146, 147, 133, 133, 133, 133, 133, 133,
133, 133, 0, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133
} ;
static yyconst short int yy_nxt[399] =
{ 0,
133, 133, 29, 29, 29, 29, 29, 68, 33, 31,
31, 30, 30, 30, 30, 34, 69, 64, 31, 31,
29, 64, 33, 68, 65, 35, 66, 88, 65, 34,
66, 70, 69, 71, 70, 70, 71, 71, 89, 35,
36, 36, 29, 36, 36, 36, 36, 37, 38, 36,
36, 39, 36, 36, 36, 36, 36, 36, 36, 40,
36, 36, 36, 40, 40, 40, 40, 40, 40, 40,
40, 40, 40, 36, 36, 36, 36, 87, 36, 36,
36, 36, 36, 36, 41, 78, 42, 41, 76, 42,
78, 70, 77, 71, 80, 79, 77, 85, 98, 70,
79, 94, 43, 86, 98, 43, 44, 73, 44, 45,
46, 29, 45, 45, 45, 45, 47, 48, 45, 48,
49, 45, 45, 45, 45, 50, 51, 48, 52, 53,
45, 45, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 50, 45, 29, 132, 54, 29, 55, 56,
57, 99, 57, 34, 78, 98, 30, 29, 56, 96,
57, 97, 60, 98, 79, 100, 30, 131, 130, 61,
101, 104, 60, 105, 77, 56, 29, 62, 77, 61,
85, 88, 58, 108, 100, 49, 86, 62, 112, 109,
109, 75, 89, 59, 126, 75, 112, 59, 59, 59,
59, 59, 59, 59, 59, 59, 59, 29, 113, 113,
129, 99, 117, 58, 113, 117, 49, 113, 117, 128,
119, 125, 124, 117, 59, 100, 120, 120, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 102, 101,
76, 123, 77, 77, 77, 122, 77, 77, 77, 121,
118, 126, 100, 100, 118, 115, 103, 127, 127, 114,
103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
99, 111, 110, 106, 82, 74, 93, 91, 90, 84,
82, 116, 116, 116, 100, 74, 133, 133, 116, 133,
133, 133, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 28, 28, 28, 28, 28, 32, 32, 32,
32, 32, 45, 45, 45, 45, 45, 63, 63, 63,
63, 63, 67, 67, 67, 67, 67, 72, 133, 72,
72, 72, 75, 75, 133, 75, 75, 81, 81, 81,
81, 81, 83, 133, 83, 83, 83, 92, 133, 92,
133, 92, 95, 133, 95, 95, 95, 107, 133, 107,
107, 107, 27, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133
} ;
static yyconst short int yy_chk[399] =
{ 0,
0, 0, 1, 2, 3, 4, 5, 25, 5, 3,
4, 1, 2, 3, 4, 5, 25, 23, 3, 4,
6, 24, 6, 26, 23, 5, 23, 60, 24, 6,
24, 30, 26, 30, 34, 39, 34, 39, 60, 6,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 11, 11, 145, 12, 12,
13, 13, 14, 14, 11, 48, 11, 12, 47, 12,
57, 49, 47, 49, 142, 48, 47, 58, 70, 66,
57, 66, 11, 58, 70, 12, 13, 140, 14, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 17, 131, 17, 21, 17, 17,
17, 75, 17, 17, 78, 71, 21, 22, 17, 69,
17, 69, 21, 71, 78, 75, 22, 130, 129, 21,
76, 79, 22, 79, 76, 17, 19, 21, 76, 22,
85, 88, 19, 84, 76, 19, 85, 22, 94, 84,
84, 102, 88, 19, 127, 102, 94, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 20, 96, 97,
122, 99, 104, 20, 96, 105, 20, 97, 104, 121,
109, 117, 113, 105, 20, 99, 109, 109, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 77, 101,
115, 112, 77, 101, 115, 111, 77, 101, 115, 110,
108, 120, 77, 101, 107, 100, 77, 120, 120, 98,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
103, 91, 90, 83, 81, 74, 65, 62, 61, 55,
53, 103, 103, 103, 103, 46, 27, 0, 103, 0,
0, 0, 103, 103, 103, 103, 103, 103, 103, 103,
103, 103, 134, 134, 134, 134, 134, 135, 135, 135,
135, 135, 136, 136, 136, 136, 136, 137, 137, 137,
137, 137, 138, 138, 138, 138, 138, 139, 0, 139,
139, 139, 141, 141, 0, 141, 141, 143, 143, 143,
143, 143, 144, 0, 144, 144, 144, 146, 0, 146,
0, 146, 147, 0, 147, 147, 147, 148, 0, 148,
148, 148, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133
} ;
static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
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;
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
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; \
}
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "defargs.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* All output generated with Doxygen is not covered by this license.
*
*/
/*! \file
* This scanner is used to convert a string into a list of function or
* template arguments. Each parsed argument results in a Argument struct,
* that is put into an ArgumentList in declaration order.
* Comment blocks for arguments can also be included in the string.
* The argument string does not contain new-lines (except inside any
* comment blocks).
* An Argument consists of the string fields:
* type,name,default value, and documentation
* The Argument list as a whole can be pure, constant or volatile.
*
* Examples of input strings are:
* \code
* "(int a,int b) const"
* "(const char *s="hello world",int=5) = 0"
* "<class T,class N>"
* "(char c,const char)"
* \endcode
*
* Note: It is not always possible to distinguish between the name and
* type of an argument. In case of doubt the name is added to the
* type, and the matchArgumentList in util.cpp is be used to
* further determine the correct separation.
*/
#line 43 "defargs.l"
/*
* includes
*/
#include "qtbc.h"
#include <stdio.h>
#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include <qregexp.h>
#include "defargs.h"
#include "entry.h"
#include "util.h"
#define YY_NEVER_INTERACTIVE 1
/* -----------------------------------------------------------------
* state variables
*/
static const char *g_inputString;
static int g_inputPosition;
static ArgumentList *g_argList;
static QCString *g_copyArgValue;
static QCString g_curArgTypeName;
static QCString g_curArgDefValue;
static QCString g_curArgName;
static QCString g_curArgDocs;
static QCString g_curArgAttrib;
static QCString g_curArgArray;
static int g_argRoundCount;
static int g_argSharpCount;
static int g_argCurlyCount;
static int g_readArgContext;
static int g_lastDocContext;
static int g_lastDocChar;
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
static int yyread(char *buf,int max_size)
{
int c=0;
while( c < max_size && g_inputString[g_inputPosition] )
{
*buf = g_inputString[g_inputPosition++] ;
c++; buf++;
}
return c;
}
#define Start 1
#define CopyArgString 2
#define CopyArgRound 3
#define CopyArgRound2 4
#define CopyArgSharp 5
#define CopyArgCurly 6
#define ReadFuncArgType 7
#define ReadFuncArgDef 8
#define ReadFuncArgPtr 9
#define FuncQual 10
#define ReadDocBlock 11
#define ReadDocLine 12
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 117 "defargs.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_state_ptr = yy_state_buf;
*yy_state_ptr++ = yy_current_state;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 134 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state;
++yy_cp;
}
while ( yy_base[yy_current_state] != 363 );
yy_find_action:
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
for ( ; ; ) /* until we find what rule we matched */
{
if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
{
yy_act = yy_acclist[yy_lp];
if ( yy_act & YY_TRAILING_HEAD_MASK ||
yy_looking_for_trail_begin )
{
if ( yy_act == yy_looking_for_trail_begin )
{
yy_looking_for_trail_begin = 0;
yy_act &= ~YY_TRAILING_HEAD_MASK;
break;
}
}
else if ( yy_act & YY_TRAILING_MASK )
{
yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
}
else
{
yy_full_match = yy_cp;
yy_full_state = yy_state_ptr;
yy_full_lp = yy_lp;
break;
}
++yy_lp;
goto find_rule;
}
--yy_cp;
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
#line 119 "defargs.l"
{ BEGIN(ReadFuncArgType); }
YY_BREAK
case 2:
YY_RULE_SETUP
#line 121 "defargs.l"
{
g_curArgTypeName+=" ";
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 124 "defargs.l"
{
if (g_curArgTypeName.stripWhiteSpace().isEmpty())
{
g_curArgAttrib=yytext; // for M$-IDL
}
else // array type
{
g_curArgArray+=yytext;
}
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 134 "defargs.l"
{ g_curArgDefValue+=yytext; }
YY_BREAK
case 5:
YY_RULE_SETUP
#line 135 "defargs.l"
{ g_curArgDefValue+=yytext; }
YY_BREAK
case 6:
YY_RULE_SETUP
#line 136 "defargs.l"
{ g_curArgDefValue+=yytext; }
YY_BREAK
case 7:
YY_RULE_SETUP
#line 137 "defargs.l"
{
g_curArgDefValue+=*yytext;
BEGIN( CopyArgString );
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 141 "defargs.l"
{
// function pointer as argument
g_curArgTypeName+=yytext;
//g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace();
BEGIN( ReadFuncArgPtr );
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 147 "defargs.l"
{
g_curArgName=yytext;
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 150 "defargs.l"
{
g_curArgTypeName+=yytext;
//g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace();
g_readArgContext = ReadFuncArgType;
g_copyArgValue=&g_curArgTypeName;
g_argRoundCount=0;
BEGIN( CopyArgRound2 );
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 158 "defargs.l"
{ // redundant braces detected / remove them
int i=g_curArgTypeName.findRev('('),l=g_curArgTypeName.length();
if (i!=-1)
g_curArgTypeName=g_curArgTypeName.left(i)+
g_curArgTypeName.right(l-i-1);
g_curArgTypeName+=g_curArgName;
BEGIN( ReadFuncArgType );
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 166 "defargs.l"
{
if (YY_START==ReadFuncArgType)
{
g_curArgTypeName+=*yytext;
g_copyArgValue=&g_curArgTypeName;
}
else // YY_START==ReadFuncArgDef
{
g_curArgDefValue+=*yytext;
g_copyArgValue=&g_curArgDefValue;
}
g_readArgContext = YY_START;
if (*yytext=='(')
{
g_argRoundCount=0;
BEGIN( CopyArgRound );
}
else if (*yytext=='{')
{
g_argCurlyCount=0;
BEGIN( CopyArgCurly );
}
else // yytext=='<'
{
g_argSharpCount=0;
BEGIN( CopyArgSharp );
}
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 194 "defargs.l"
{
g_argRoundCount++;
*g_copyArgValue += *yytext;
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 198 "defargs.l"
{
*g_copyArgValue += *yytext;
if (g_argRoundCount>0)
{
g_argRoundCount--;
}
else
{
if (YY_START==CopyArgRound2)
{
*g_copyArgValue+=" "+g_curArgName;
}
BEGIN( g_readArgContext );
}
}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 213 "defargs.l"
{
g_argSharpCount++;
*g_copyArgValue += *yytext;
}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 217 "defargs.l"
{
*g_copyArgValue += *yytext;
if (g_argSharpCount>0) g_argSharpCount--;
else BEGIN( g_readArgContext );
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 222 "defargs.l"
{
g_argCurlyCount++;
*g_copyArgValue += *yytext;
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 226 "defargs.l"
{
*g_copyArgValue += *yytext;
if (g_argCurlyCount>0) g_argCurlyCount--;
else BEGIN( g_readArgContext );
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 231 "defargs.l"
{
g_curArgDefValue+=yytext;
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 234 "defargs.l"
{
g_curArgDefValue+=*yytext;
BEGIN( ReadFuncArgDef );
}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 238 "defargs.l"
{
BEGIN( ReadFuncArgDef );
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 241 "defargs.l"
{
g_lastDocContext=YY_START;
g_lastDocChar=*yytext;
QCString text=yytext;
if (text.find("//")!=-1)
BEGIN( ReadDocLine );
else
BEGIN( ReadDocBlock );
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 250 "defargs.l"
{
g_curArgTypeName=removeRedundantWhiteSpace(
g_curArgTypeName.simplifyWhiteSpace());
g_curArgDefValue=g_curArgDefValue.stripWhiteSpace();
int l=g_curArgTypeName.length();
if (l>0)
{
int i=l-1;
while (i>=0 &&
(
isspace(g_curArgTypeName.at(i)) ||
isId(g_curArgTypeName.at(i))
)
) i--;
Argument *a = new Argument;
a->attrib = g_curArgAttrib.copy();
if (i>=0 && g_curArgTypeName.at(i)!=':')
{ // type contains a name
a->type = g_curArgTypeName.left(i+1).stripWhiteSpace();
a->name = g_curArgTypeName.right(g_curArgTypeName.length()-i-1);
}
else // assume only the type was specified, try to determine name later
{
a->type = g_curArgTypeName.stripWhiteSpace();
}
a->array = g_curArgArray.copy();
a->defval = g_curArgDefValue.copy();
a->docs = g_curArgDocs.stripWhiteSpace();
//printf("Argument %s %s adding docs=`%s'\n",a->type.data(),a->name.data(),a->docs.data());
g_argList->append(a);
}
g_curArgAttrib.resize(0);
g_curArgTypeName.resize(0);
g_curArgDefValue.resize(0);
g_curArgArray.resize(0);
g_curArgDocs.resize(0);
if (*yytext==')')
{
BEGIN(FuncQual);
//printf(">>> end of argument list\n");
}
else
{
BEGIN( ReadFuncArgType );
}
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 296 "defargs.l"
{
QCString name=yytext; //resolveDefines(yytext);
//printf("resolveName `%s'->`%s'\n",yytext,name.data());
g_curArgTypeName+=name;
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 301 "defargs.l"
{
g_curArgTypeName+=*yytext;
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 304 "defargs.l"
{
g_curArgDefValue+=*yytext;
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 307 "defargs.l"
{
QCString name=yytext; //resolveDefines(yytext);
*g_copyArgValue+=name;
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 311 "defargs.l"
{
*g_copyArgValue += *yytext;
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 314 "defargs.l"
{
g_argList->constSpecifier=TRUE;
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 317 "defargs.l"
{
g_argList->volatileSpecifier=TRUE;
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 320 "defargs.l"
{
g_argList->pureSpecifier=TRUE;
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 323 "defargs.l"
{
g_curArgDocs+=yytext;
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 326 "defargs.l"
{
g_curArgDocs+=yytext;
}
YY_BREAK
case 34:
YY_RULE_SETUP
#line 329 "defargs.l"
{
if (g_lastDocChar!=0)
unput(g_lastDocChar);
BEGIN(g_lastDocContext);
}
YY_BREAK
case 35:
YY_RULE_SETUP
#line 334 "defargs.l"
{
if (g_lastDocChar!=0)
unput(g_lastDocChar);
BEGIN(g_lastDocContext);
}
YY_BREAK
case 36:
YY_RULE_SETUP
#line 339 "defargs.l"
{
g_curArgDocs+=*yytext;
}
YY_BREAK
case 37:
YY_RULE_SETUP
#line 342 "defargs.l"
{
g_curArgDocs+=*yytext;
}
YY_BREAK
case 38:
YY_RULE_SETUP
#line 345 "defargs.l"
{
g_lastDocContext=YY_START;
g_lastDocChar=0;
if (yytext[1]=='/')
BEGIN( ReadDocLine );
else
BEGIN( ReadDocBlock );
}
YY_BREAK
case 39:
YY_RULE_SETUP
#line 353 "defargs.l"
YY_BREAK
case 40:
YY_RULE_SETUP
#line 354 "defargs.l"
YY_BREAK
case 41:
YY_RULE_SETUP
#line 356 "defargs.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Start):
case YY_STATE_EOF(CopyArgString):
case YY_STATE_EOF(CopyArgRound):
case YY_STATE_EOF(CopyArgRound2):
case YY_STATE_EOF(CopyArgSharp):
case YY_STATE_EOF(CopyArgCurly):
case YY_STATE_EOF(ReadFuncArgType):
case YY_STATE_EOF(ReadFuncArgDef):
case YY_STATE_EOF(ReadFuncArgPtr):
case YY_STATE_EOF(FuncQual):
case YY_STATE_EOF(ReadDocBlock):
case YY_STATE_EOF(ReadDocLine):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
yy_state_ptr = yy_state_buf;
*yy_state_ptr++ = yy_current_state;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 134 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state;
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register YY_CHAR yy_c = 1;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 134 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 133);
if ( ! yy_is_jam )
*yy_state_ptr++ = yy_current_state;
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 356 "defargs.l"
/* ----------------------------------------------------------------------------
*/
/*! Converts an argument string into an ArgumentList.
* \param argsString the list of Arguments.
* \param al a reference to resulting argument list pointer.
*/
void stringToArgumentList(const char *argsString,ArgumentList* &al)
{
if (al==0) return;
if (argsString==0) return;
g_inputString = argsString;
//printf("stringToArgumentList(%s)\n",argsString);
g_inputPosition = 0;
g_curArgTypeName.resize(0);
g_curArgDefValue.resize(0);
g_curArgName.resize(0);
g_argList = al;
defargsYYrestart( defargsYYin );
BEGIN( Start );
defargsYYlex();
}
extern "C" { // some bogus code to keep the compiler happy
void defargsYYdummy() { yy_flex_realloc(0,0); }
}
...@@ -53,7 +53,7 @@ class DefineList : public QList<Define> ...@@ -53,7 +53,7 @@ class DefineList : public QList<Define>
~DefineList() {} ~DefineList() {}
int compareItems(GCI i1,GCI i2) int compareItems(GCI i1,GCI i2)
{ {
return strcmp(((Define *)i1)->name,((Define *)i2)->name); return strcasecmp(((Define *)i1)->name,((Define *)i2)->name);
} }
}; };
...@@ -65,7 +65,7 @@ class DefineName : public QList<Define> ...@@ -65,7 +65,7 @@ class DefineName : public QList<Define>
const char *nameString() const { return name; } const char *nameString() const { return name; }
int compareItems(GCI i1,GCI i2) int compareItems(GCI i1,GCI i2)
{ {
return strcmp(((Define *)i1)->name,((Define *)i2)->name); return strcasecmp(((Define *)i1)->name,((Define *)i2)->name);
} }
private: private:
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "dot.h" #include "dot.h"
#include "doxygen.h" #include "doxygen.h"
#include "message.h" #include "message.h"
#include "util.h"
#include <qdir.h> #include <qdir.h>
#include <qfile.h> #include <qfile.h>
...@@ -158,7 +159,7 @@ class DotNodeList : public QList<DotNode> ...@@ -158,7 +159,7 @@ class DotNodeList : public QList<DotNode>
~DotNodeList() {} ~DotNodeList() {}
int compareItems(GCI item1,GCI item2) int compareItems(GCI item1,GCI item2)
{ {
return strcmp(((DotNode *)item1)->m_label,((DotNode *)item2)->m_label); return strcasecmp(((DotNode *)item1)->m_label,((DotNode *)item2)->m_label);
} }
}; };
...@@ -173,6 +174,7 @@ DotNode::DotNode(int n,const char *lab,const char *url,int distance,bool isRoot) ...@@ -173,6 +174,7 @@ DotNode::DotNode(int n,const char *lab,const char *url,int distance,bool isRoot)
m_subgraphId=-1; m_subgraphId=-1;
m_deleted=FALSE; m_deleted=FALSE;
m_written=FALSE; m_written=FALSE;
m_hasDoc=FALSE;
m_distance = distance; m_distance = distance;
} }
...@@ -269,20 +271,8 @@ void DotNode::deleteNode() ...@@ -269,20 +271,8 @@ void DotNode::deleteNode()
delete this; delete this;
} }
void DotNode::write(QTextStream &t,int distance) void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren)
{ {
if (m_written) return; // node already written to the output
if (m_distance>distance) return;
bool hasNonReachableChildren=FALSE;
if (m_distance==distance && m_children)
{
QListIterator<DotNode> dnli(*m_children);
DotNode *cn;
for (dnli.toFirst();(cn=dnli.current());++dnli)
{
if (cn->m_distance>distance) hasNonReachableChildren=TRUE;
}
}
const char *labCol = (hasNonReachableChildren) ? "red" : const char *labCol = (hasNonReachableChildren) ? "red" :
(m_url.isEmpty() ? "grey" : "black"); (m_url.isEmpty() ? "grey" : "black");
t << " Node" << m_number << " [shape=\"box\",label=\"" << m_label t << " Node" << m_number << " [shape=\"box\",label=\"" << m_label
...@@ -297,6 +287,42 @@ void DotNode::write(QTextStream &t,int distance) ...@@ -297,6 +287,42 @@ void DotNode::write(QTextStream &t,int distance)
t << ",URL=\"" << m_url << ".html\""; t << ",URL=\"" << m_url << ".html\"";
} }
t << "];" << endl; t << "];" << endl;
}
void DotNode::writeArrow(QTextStream &t,DotNode *cn,EdgeInfo *ei,bool topDown)
{
t << " Node";
if (topDown) t << cn->number(); else t << m_number;
t << " -> Node";
if (topDown) t << m_number; else t << cn->number();
t << " [";
t << "dir=back,";
t << "color=\"" << edgeColorMap[ei->m_color]
<< "\",fontsize=10,style=\"" << edgeStyleMap[ei->m_style] << "\"";
if (!ei->m_label.isEmpty())
{
t << ",label=\"" << ei->m_label << "\"";
}
t << ",fontname=\"doxfont\"";
t << "];" << endl;
}
void DotNode::write(QTextStream &t,bool topDown,int distance)
{
//printf("DotNode::write(%d) name=%s\n",distance,m_label.data());
if (m_written) return; // node already written to the output
if (m_distance>distance) return;
bool hasNonReachableChildren=FALSE;
if (m_distance==distance && m_children)
{
QListIterator<DotNode> dnli(*m_children);
DotNode *cn;
for (dnli.toFirst();(cn=dnli.current());++dnli)
{
if (cn->m_distance>distance) hasNonReachableChildren=TRUE;
}
}
writeBox(t,hasNonReachableChildren);
m_written=TRUE; m_written=TRUE;
if (m_children) if (m_children)
{ {
...@@ -305,19 +331,8 @@ void DotNode::write(QTextStream &t,int distance) ...@@ -305,19 +331,8 @@ void DotNode::write(QTextStream &t,int distance)
DotNode *cn; DotNode *cn;
for (dnli1.toFirst();(cn=dnli1.current());++dnli1,++dnli2) for (dnli1.toFirst();(cn=dnli1.current());++dnli1,++dnli2)
{ {
if (cn->m_distance<=distance) if (cn->m_distance<=distance) writeArrow(t,cn,dnli2.current(),topDown);
{ cn->write(t,topDown,distance);
EdgeInfo *ei=dnli2.current();
t << " Node" << cn->number() << " -> Node" << m_number
<< " [dir=back,color=\"" << edgeColorMap[ei->m_color]
<< "\",fontsize=10,style=\"" << edgeStyleMap[ei->m_style] << "\"";
if (!ei->m_label.isEmpty())
{
t << ",label=\"" << ei->m_label << "\",fontname=\"doxfont\"";
}
t << "];" << endl;
}
cn->write(t,distance);
} }
} }
} }
...@@ -363,6 +378,7 @@ void DotNode::colorConnectedNodes(int curColor) ...@@ -363,6 +378,7 @@ void DotNode::colorConnectedNodes(int curColor)
{ {
cn->m_subgraphId=curColor; cn->m_subgraphId=curColor;
cn->colorConnectedNodes(curColor); cn->colorConnectedNodes(curColor);
//printf("coloring node %s (%p): %d\n",cn->m_label.data(),cn,cn->m_subgraphId);
} }
} }
} }
...@@ -377,22 +393,45 @@ void DotNode::colorConnectedNodes(int curColor) ...@@ -377,22 +393,45 @@ void DotNode::colorConnectedNodes(int curColor)
{ {
pn->m_subgraphId=curColor; pn->m_subgraphId=curColor;
pn->colorConnectedNodes(curColor); pn->colorConnectedNodes(curColor);
//printf("coloring node %s (%p): %d\n",pn->m_label.data(),pn,pn->m_subgraphId);
} }
} }
} }
} }
const DotNode *DotNode::findRoot() const const DotNode *DotNode::findDocNode() const
{ {
if (m_children==0 || m_children->count()==0) if (!m_url.isEmpty()) return this;
//printf("findDocNode(): `%s'\n",m_label.data());
if (m_parents)
{
QListIterator<DotNode> dnli(*m_parents);
DotNode *pn;
for (dnli.toFirst();(pn=dnli.current());++dnli)
{ {
return this; if (!pn->m_hasDoc)
{
pn->m_hasDoc=TRUE;
const DotNode *dn = pn->findDocNode();
if (dn) return dn;
} }
else }
}
if (m_children)
{ {
DotNode *cn = m_children->first(); QListIterator<DotNode> dnli(*m_children);
return cn->findRoot(); DotNode *cn;
for (dnli.toFirst();(cn=dnli.current());++dnli)
{
if (!cn->m_hasDoc)
{
cn->m_hasDoc=TRUE;
const DotNode *dn = cn->findDocNode();
if (dn) return dn;
} }
}
}
return 0;
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -425,7 +464,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -425,7 +464,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
QCString baseName; QCString baseName;
QCString diskName=n->m_url.copy(); QCString diskName=n->m_url.copy();
int i=diskName.find('$'); /* should not return -1 */ int i=diskName.find('$'); /* should not return -1 */
if (i!=-1) diskName=diskName.right(diskName.length()-i-1); ASSERT(i!=-1);
diskName=diskName.right(diskName.length()-i-1);
baseName.sprintf("inherit_graph_%s",diskName.data()); baseName.sprintf("inherit_graph_%s",diskName.data());
QCString dotName=baseName+".dot"; QCString dotName=baseName+".dot";
QCString gifName=baseName+".gif"; QCString gifName=baseName+".gif";
...@@ -441,7 +481,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -441,7 +481,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
DotNode *node; DotNode *node;
for (;(node=dnli2.current());++dnli2) for (;(node=dnli2.current());++dnli2)
{ {
if (node->m_subgraphId==n->m_subgraphId) node->write(t); if (node->m_subgraphId==n->m_subgraphId) node->write(t,FALSE);
} }
t << "}" << endl; t << "}" << endl;
f.close(); f.close();
...@@ -476,15 +516,22 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -476,15 +516,22 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
} }
void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd) void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper)
{ {
BaseClassListIterator bcli(*cd->baseClasses()); //printf("addHierarchy `%s' baseClasses=%d\n",cd->name().data(),cd->baseClasses()->count());
BaseClassListIterator bcli(*cd->superClasses());
BaseClassDef *bcd; BaseClassDef *bcd;
for ( ; (bcd=bcli.current()) ; ++bcli ) for ( ; (bcd=bcli.current()) ; ++bcli )
{ {
ClassDef *bClass=bcd->classDef; ClassDef *bClass=bcd->classDef;
//printf("Trying super class=`%s'\n",bClass->name().data());
if (bClass->isVisibleInHierarchy() && hasVisibleRoot(bClass->baseClasses()))
{
DotNode *bn; DotNode *bn;
if ((bn=m_usedNodes->find(bClass->name()))) // node already used => make reference node to it //printf("Found visible class=`%s'\n",bClass->name().data());
if ((bn=m_usedNodes->find(bClass->name()))) // node already present
{
if (n->m_children==0 || n->m_children->findRef(bn)==0) // no arrow yet
{ {
n->addChild(bn,bcd->prot); n->addChild(bn,bcd->prot);
bn->addParent(n); bn->addParent(n);
...@@ -495,22 +542,31 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd) ...@@ -495,22 +542,31 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd)
// bn->m_parents ? bn->m_parents->count() : 0 // bn->m_parents ? bn->m_parents->count() : 0
// ); // );
} }
else // add new node }
else
{ {
DotNode *newNode = new DotNode(m_curNodeNumber++, bn = new DotNode(m_curNodeNumber++,
bClass->name(), bClass->name(),
bClass->getReference()+"$"+bClass->getOutputFileBase() bClass->isLinkable() ?
(bClass->getReference()+"$"+bClass->getOutputFileBase()).data() :
0
); );
n->addChild(newNode,bcd->prot);
newNode->addParent(n);
m_usedNodes->insert(bClass->name(),newNode); // add node to the used list
//printf("Adding node %s to new base node %s (c=%d,p=%d)\n", //printf("Adding node %s to new base node %s (c=%d,p=%d)\n",
// n->m_label.data(), // n->m_label.data(),
// newNode->m_label.data(), // bn->m_label.data(),
// newNode->m_children ? newNode->m_children->count() : 0, // bn->m_children ? bn->m_children->count() : 0,
// newNode->m_parents ? newNode->m_parents->count() : 0 // bn->m_parents ? bn->m_parents->count() : 0
// ); // );
addHierarchy(newNode,bClass); n->addChild(bn,bcd->prot);
bn->addParent(n);
m_usedNodes->insert(bClass->name(),bn); // add node to the used list
}
if (!bClass->visited && !hideSuper && bClass->superClasses()->count()>0)
{
bool wasVisited=bClass->visited;
bClass->visited=TRUE;
addHierarchy(bn,bClass,wasVisited);
}
} }
} }
} }
...@@ -525,27 +581,32 @@ DotGfxHierarchyTable::DotGfxHierarchyTable() ...@@ -525,27 +581,32 @@ DotGfxHierarchyTable::DotGfxHierarchyTable()
// build a graph with each class as a node and the inheritance relations // build a graph with each class as a node and the inheritance relations
// as edges // as edges
initClassHierarchy(&classList);
ClassListIterator cli(classList); ClassListIterator cli(classList);
ClassDef *cd; ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli) for (cli.toFirst();(cd=cli.current());++cli)
{ {
//printf("Trying %s superClasses=%d\n",cd->name().data(),cd->superClasses()->count()); //printf("Trying %s superClasses=%d\n",cd->name().data(),cd->superClasses()->count());
if (isLeaf(cd) && if (!hasVisibleRoot(cd->baseClasses()))
( {
(!Config::allExtFlag && cd->isLinkableInProject()) || if (cd->isVisibleInHierarchy()) // root class in the graph
(Config::allExtFlag && cd->isLinkable())
)
) // root class in the graph
{ {
//printf("Inserting root class %s\n",cd->name().data()); //printf("Inserting root class %s\n",cd->name().data());
DotNode *n = new DotNode(m_curNodeNumber++, DotNode *n = new DotNode(m_curNodeNumber++,
cd->name(), cd->name(),
cd->getReference()+"$"+cd->getOutputFileBase() cd->isLinkable() ?
(cd->getReference()+"$"+cd->getOutputFileBase()).data() :
0
); );
//m_usedNodes->clear(); //m_usedNodes->clear();
m_usedNodes->insert(cd->name(),n); m_usedNodes->insert(cd->name(),n);
addHierarchy(n,cd);
m_rootNodes->insert(0,n); m_rootNodes->insert(0,n);
if (!cd->visited && cd->superClasses()->count()>0)
{
addHierarchy(n,cd,cd->visited);
cd->visited=TRUE;
}
}
} }
} }
// m_usedNodes now contains all nodes in the graph // m_usedNodes now contains all nodes in the graph
...@@ -562,12 +623,14 @@ DotGfxHierarchyTable::DotGfxHierarchyTable() ...@@ -562,12 +623,14 @@ DotGfxHierarchyTable::DotGfxHierarchyTable()
{ {
if (n->m_subgraphId==-1) // not yet colored if (n->m_subgraphId==-1) // not yet colored
{ {
//printf("Starting at node %s\n",n->m_label.data()); //printf("Starting at node %s (%p): %d\n",n->m_label.data(),n,curColor);
done=FALSE; // still uncolored nodes done=FALSE; // still uncolored nodes
n->m_subgraphId=curColor; n->m_subgraphId=curColor;
n->colorConnectedNodes(curColor); n->colorConnectedNodes(curColor);
curColor++; curColor++;
m_rootSubgraphs->inSort(n->findRoot()); const DotNode *dn=n->findDocNode();
ASSERT(dn!=0);
if (dn!=0) m_rootSubgraphs->inSort(dn);
} }
} }
} }
...@@ -605,11 +668,6 @@ int DotGfxUsageGraph::m_curNodeNumber; ...@@ -605,11 +668,6 @@ int DotGfxUsageGraph::m_curNodeNumber;
void DotGfxUsageGraph::addClass(ClassDef *cd,DotNode *n,int prot, void DotGfxUsageGraph::addClass(ClassDef *cd,DotNode *n,int prot,
const char *label,int distance) const char *label,int distance)
{ {
if (
(!Config::allExtFlag && cd->isLinkableInProject()) ||
(Config::allExtFlag && cd->isLinkable())
)
{
//printf(":: DoxGfxUsageGraph::addClass(class=%s,parent=%s,prot=%d,label=%s,dist=%d)\n", //printf(":: DoxGfxUsageGraph::addClass(class=%s,parent=%s,prot=%d,label=%s,dist=%d)\n",
// cd->name().data(),n->m_label.data(),prot,label,distance); // cd->name().data(),n->m_label.data(),prot,label,distance);
int edgeStyle = label ? EdgeInfo::Dashed : EdgeInfo::Solid; int edgeStyle = label ? EdgeInfo::Dashed : EdgeInfo::Solid;
...@@ -625,7 +683,8 @@ void DotGfxUsageGraph::addClass(ClassDef *cd,DotNode *n,int prot, ...@@ -625,7 +683,8 @@ void DotGfxUsageGraph::addClass(ClassDef *cd,DotNode *n,int prot,
{ {
bn = new DotNode(m_curNodeNumber++, bn = new DotNode(m_curNodeNumber++,
cd->name(), cd->name(),
cd->getReference()+"$"+cd->getOutputFileBase(), cd->isLinkable() ?
(cd->getReference()+"$"+cd->getOutputFileBase()).data() : 0,
distance distance
); );
if (distance>m_maxDistance) m_maxDistance=distance; if (distance>m_maxDistance) m_maxDistance=distance;
...@@ -635,7 +694,6 @@ void DotGfxUsageGraph::addClass(ClassDef *cd,DotNode *n,int prot, ...@@ -635,7 +694,6 @@ void DotGfxUsageGraph::addClass(ClassDef *cd,DotNode *n,int prot,
//printf(" add used node %s of %s\n",cd->name().data(),n->m_label.data()); //printf(" add used node %s of %s\n",cd->name().data(),n->m_label.data());
if (distance<m_recDepth) buildGraph(cd,bn,distance+1); if (distance<m_recDepth) buildGraph(cd,bn,distance+1);
} }
}
} }
void DotGfxUsageGraph::buildGraph(ClassDef *cd,DotNode *n,int distance) void DotGfxUsageGraph::buildGraph(ClassDef *cd,DotNode *n,int distance)
...@@ -685,7 +743,8 @@ DotGfxUsageGraph::DotGfxUsageGraph(ClassDef *cd,bool impl,int maxRecursionDepth) ...@@ -685,7 +743,8 @@ DotGfxUsageGraph::DotGfxUsageGraph(ClassDef *cd,bool impl,int maxRecursionDepth)
m_recDepth = maxRecursionDepth; m_recDepth = maxRecursionDepth;
m_startNode = new DotNode(m_curNodeNumber++, m_startNode = new DotNode(m_curNodeNumber++,
cd->name(), cd->name(),
cd->getReference()+"$"+cd->getOutputFileBase(), cd->isLinkable() ?
(cd->getReference()+"$"+cd->getOutputFileBase()).data() : 0,
0, // distance 0, // distance
TRUE // is a root node TRUE // is a root node
); );
...@@ -723,7 +782,7 @@ static void writeDotGraph(DotNode *root,const QCString &baseName, ...@@ -723,7 +782,7 @@ static void writeDotGraph(DotNode *root,const QCString &baseName,
t << " rankdir=LR;" << endl; t << " rankdir=LR;" << endl;
} }
root->clearWriteFlag(); root->clearWriteFlag();
root->write(t,distance); root->write(t,TRUE,distance);
t << "}" << endl; t << "}" << endl;
f.close(); f.close();
} }
...@@ -864,6 +923,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance) ...@@ -864,6 +923,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
{ {
FileDef *bfd = ii->fileDef; FileDef *bfd = ii->fileDef;
QCString in = ii->includeName; QCString in = ii->includeName;
//printf(">>>> in=`%s' bfd=%p\n",ii->includeName.data(),bfd);
bool doc=TRUE,src=FALSE; bool doc=TRUE,src=FALSE;
if (bfd) if (bfd)
{ {
......
...@@ -59,13 +59,15 @@ class DotNode ...@@ -59,13 +59,15 @@ class DotNode
void removeChild(DotNode *n); void removeChild(DotNode *n);
void removeParent(DotNode *n); void removeParent(DotNode *n);
int number() const { return m_number; } int number() const { return m_number; }
void write(QTextStream &t,int maxDistance=1000); void write(QTextStream &t,bool topDown,int maxDistance=1000);
int m_subgraphId; int m_subgraphId;
void clearWriteFlag(); void clearWriteFlag();
private: private:
void colorConnectedNodes(int curColor); void colorConnectedNodes(int curColor);
const DotNode *findRoot() const; // only works for acyclic graphs! void writeBox(QTextStream &t,bool hasNonReachableChildren);
void writeArrow(QTextStream &t,DotNode *cn,EdgeInfo *ei,bool topDown);
const DotNode *findDocNode() const; // only works for acyclic graphs!
int m_number; int m_number;
QCString m_label; //!< label text QCString m_label; //!< label text
QCString m_url; //!< url of the node (format: remove$local) QCString m_url; //!< url of the node (format: remove$local)
...@@ -74,6 +76,7 @@ class DotNode ...@@ -74,6 +76,7 @@ class DotNode
QList<EdgeInfo> *m_edgeInfo; //!< edge info for each child QList<EdgeInfo> *m_edgeInfo; //!< edge info for each child
bool m_deleted; //!< used to mark a node as deleted bool m_deleted; //!< used to mark a node as deleted
bool m_written; //!< used to mark a node as written bool m_written; //!< used to mark a node as written
bool m_hasDoc; //!< used to mark a node as documented
int m_distance; //!< distance to the root node int m_distance; //!< distance to the root node
bool m_isRoot; //!< indicates if this is a root node bool m_isRoot; //!< indicates if this is a root node
}; };
...@@ -86,7 +89,7 @@ class DotGfxHierarchyTable ...@@ -86,7 +89,7 @@ class DotGfxHierarchyTable
void writeGraph(QTextStream &t,const char *path); void writeGraph(QTextStream &t,const char *path);
private: private:
void addHierarchy(DotNode *n,ClassDef *cd); void addHierarchy(DotNode *n,ClassDef *cd,bool hide);
QList<DotNode> *m_rootNodes; QList<DotNode> *m_rootNodes;
QDict<DotNode> *m_usedNodes; QDict<DotNode> *m_usedNodes;
......
#define yy_create_buffer tagYY_create_buffer
#define yy_delete_buffer tagYY_delete_buffer
#define yy_scan_buffer tagYY_scan_buffer
#define yy_scan_string tagYY_scan_string
#define yy_scan_bytes tagYY_scan_bytes
#define yy_flex_debug tagYY_flex_debug
#define yy_init_buffer tagYY_init_buffer
#define yy_flush_buffer tagYY_flush_buffer
#define yy_load_buffer_state tagYY_load_buffer_state
#define yy_switch_to_buffer tagYY_switch_to_buffer
#define yyin tagYYin
#define yyleng tagYYleng
#define yylex tagYYlex
#define yyout tagYYout
#define yyrestart tagYYrestart
#define yytext tagYYtext
#define yywrap tagYYwrap
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 51
#define YY_END_OF_BUFFER 52
static yyconst short int yy_accept[334] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 52, 49, 50, 49, 8, 10, 8, 10,
49, 29, 28, 27, 27, 27, 24, 30, 49, 32,
40, 40, 34, 34, 39, 49, 49, 20, 49, 21,
49, 18, 18, 18, 49, 46, 45, 46, 45, 14,
47, 48, 13, 12, 12, 49, 0, 0, 0, 10,
0, 0, 10, 0, 28, 27, 27, 27, 24, 30,
0, 0, 40, 40, 0, 0, 0, 0, 0, 21,
0, 0, 18, 18, 18, 18, 0, 0, 0, 0,
14, 48, 13, 12, 0, 9, 0, 0, 0, 0,
0, 10, 0, 27, 27, 31, 0, 40, 0, 0,
0, 37, 0, 0, 0, 18, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 10, 0, 0,
27, 27, 0, 40, 36, 35, 0, 0, 0, 0,
18, 41, 0, 44, 43, 0, 0, 6, 0, 0,
10, 0, 0, 27, 0, 0, 40, 0, 19, 0,
0, 18, 42, 0, 0, 0, 0, 10, 0, 0,
0, 0, 0, 40, 38, 0, 16, 18, 11, 0,
0, 0, 10, 0, 0, 0, 0, 0, 40, 0,
18, 0, 0, 0, 10, 0, 0, 0, 0, 33,
0, 18, 7, 0, 0, 4, 0, 23, 0, 0,
0, 0, 17, 0, 0, 17, 17, 17, 18, 18,
17, 0, 0, 0, 0, 0, 0, 17, 0, 0,
0, 0, 0, 17, 0, 18, 18, 17, 0, 0,
0, 0, 0, 15, 0, 0, 0, 0, 0, 0,
18, 0, 0, 0, 0, 0, 0, 0, 17, 17,
0, 18, 0, 0, 0, 0, 0, 0, 17, 0,
17, 0, 17, 17, 18, 0, 0, 0, 0, 26,
0, 0, 17, 0, 0, 17, 0, 0, 0, 25,
0, 0, 0, 0, 5, 0, 0, 2, 0, 0,
0, 22, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 4, 5, 6, 7, 1, 5, 8, 1, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 17,
19, 17, 17, 17, 17, 17, 17, 20, 21, 22,
23, 24, 1, 25, 26, 26, 27, 26, 26, 28,
26, 26, 29, 26, 26, 26, 26, 26, 26, 26,
26, 30, 26, 26, 26, 26, 26, 26, 26, 26,
9, 1, 10, 5, 31, 1, 32, 33, 34, 35,
36, 37, 38, 39, 40, 26, 26, 41, 42, 43,
44, 45, 26, 46, 47, 48, 26, 26, 49, 50,
51, 26, 1, 52, 1, 53, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[54] =
{ 0,
1, 1, 1, 2, 1, 2, 1, 1, 1, 1,
1, 3, 1, 3, 3, 2, 4, 4, 4, 5,
1, 6, 2, 1, 2, 7, 7, 7, 7, 7,
4, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 1, 8
} ;
static yyconst short int yy_base[356] =
{ 0,
980, 979, 0, 32, 52, 53, 75, 128, 181, 0,
234, 287, 55, 56, 340, 0, 393, 0, 446, 0,
497, 0, 65, 67, 550, 0, 54, 61, 603, 656,
68, 70, 98, 99, 709, 0, 762, 0, 815, 0,
90, 91, 981, 1136, 1136, 0, 71, 0, 78, 937,
946, 1136, 0, 0, 935, 934, 0, 0, 71, 1136,
0, 925, 1136, 28, 1136, 933, 932, 1136, 935, 0,
101, 71, 101, 0, 950, 1136, 1136, 123, 1136, 0,
1136, 0, 0, 0, 0, 949, 943, 959, 915, 0,
90, 920, 920, 954, 0, 0, 925, 915, 0, 0,
931, 905, 0, 916, 903, 902, 908, 899, 943, 0,
911, 923, 103, 113, 0, 123, 912, 901, 893, 892,
0, 0, 0, 0, 894, 1136, 895, 901, 118, 932,
910, 889, 126, 875, 882, 1136, 871, 870, 894, 893,
877, 1136, 0, 868, 893, 124, 884, 862, 885, 884,
858, 871, 877, 867, 1136, 864, 1136, 850, 854, 848,
846, 888, 838, 845, 1136, 1136, 826, 849, 820, 675,
216, 1136, 685, 1136, 1136, 669, 662, 1136, 662, 661,
661, 667, 662, 693, 666, 652, 646, 657, 1136, 641,
667, 125, 1136, 666, 653, 648, 655, 638, 638, 645,
646, 638, 635, 626, 1136, 620, 1136, 118, 1136, 630,
614, 604, 603, 602, 625, 610, 607, 616, 593, 606,
208, 631, 593, 588, 630, 609, 624, 586, 586, 0,
583, 867, 1136, 597, 595, 1136, 611, 1136, 579, 502,
524, 919, 252, 233, 619, 631, 1136, 965, 232, 263,
874, 512, 539, 508, 497, 506, 535, 877, 503, 502,
495, 488, 487, 119, 496, 226, 228, 0, 497, 494,
489, 493, 485, 1136, 486, 477, 480, 503, 502, 474,
269, 478, 475, 511, 473, 481, 478, 491, 103, 255,
489, 270, 456, 497, 497, 304, 301, 286, 294, 295,
298, 291, 307, 320, 283, 293, 304, 287, 289, 1136,
288, 269, 312, 236, 235, 271, 234, 0, 227, 1136,
209, 228, 225, 155, 1136, 139, 129, 1136, 106, 117,
108, 1136, 1136, 1018, 1026, 1034, 1042, 1050, 1058, 65,
1063, 1068, 1072, 1077, 1081, 1085, 1089, 1094, 1100, 1105,
58, 1109, 1117, 1124, 1128
} ;
static yyconst short int yy_def[356] =
{ 0,
334, 334, 333, 3, 334, 334, 335, 335, 333, 9,
336, 336, 334, 334, 333, 15, 333, 17, 333, 19,
334, 21, 334, 334, 333, 25, 334, 334, 337, 337,
334, 334, 338, 338, 333, 35, 333, 37, 333, 39,
339, 339, 333, 333, 333, 340, 333, 341, 333, 341,
333, 333, 342, 343, 343, 343, 344, 345, 333, 333,
346, 346, 333, 333, 333, 333, 333, 333, 333, 347,
333, 348, 348, 349, 333, 333, 333, 333, 333, 350,
333, 351, 352, 353, 353, 333, 340, 333, 333, 341,
333, 333, 341, 333, 342, 343, 343, 343, 344, 345,
333, 333, 346, 346, 333, 333, 333, 333, 333, 347,
333, 333, 348, 348, 349, 348, 333, 333, 333, 333,
350, 351, 352, 353, 333, 333, 333, 333, 333, 333,
333, 341, 333, 343, 343, 333, 333, 346, 333, 333,
333, 333, 354, 333, 333, 348, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 341, 333, 333,
343, 343, 333, 346, 333, 333, 333, 354, 333, 333,
348, 333, 333, 333, 333, 333, 333, 333, 333, 333,
341, 333, 333, 343, 333, 333, 346, 333, 333, 333,
333, 348, 333, 333, 333, 333, 333, 341, 333, 333,
333, 333, 333, 346, 333, 333, 333, 348, 333, 333,
333, 333, 341, 333, 333, 333, 333, 333, 346, 333,
348, 333, 333, 333, 341, 333, 333, 333, 333, 346,
333, 348, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 348, 333, 348, 348, 348,
349, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 348, 333, 348, 348, 349, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
348, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 348, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 348, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 355, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 0, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333
} ;
static yyconst short int yy_nxt[1190] =
{ 0,
44, 44, 45, 44, 44, 44, 44, 46, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 47, 44, 44, 44, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 44, 44, 49, 45, 45, 45, 45, 45, 71,
50, 52, 52, 45, 122, 105, 71, 68, 106, 68,
45, 87, 45, 51, 51, 44, 44, 45, 44, 44,
44, 52, 44, 44, 44, 44, 69, 44, 69, 75,
44, 75, 85, 85, 44, 44, 44, 44, 44, 44,
77, 77, 88, 101, 111, 78, 78, 129, 130, 88,
300, 86, 86, 332, 114, 89, 91, 102, 92, 79,
79, 154, 89, 115, 112, 301, 44, 44, 44, 44,
45, 44, 44, 44, 52, 44, 44, 44, 44, 331,
44, 155, 330, 44, 114, 116, 114, 44, 44, 44,
44, 44, 44, 115, 118, 115, 114, 116, 146, 159,
119, 221, 114, 120, 160, 115, 114, 114, 114, 171,
115, 115, 208, 313, 329, 115, 115, 115, 328, 44,
44, 44, 44, 45, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 54, 54, 54,
44, 44, 44, 44, 44, 44, 54, 55, 56, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 44, 44, 44, 44, 45, 44, 44, 44,
44, 44, 44, 44, 44, 303, 44, 192, 301, 44,
327, 114, 116, 232, 44, 44, 44, 44, 44, 114,
115, 247, 302, 247, 261, 247, 281, 266, 115, 114,
262, 114, 326, 263, 247, 114, 264, 303, 115, 324,
115, 316, 323, 322, 115, 44, 44, 44, 44, 45,
44, 44, 44, 44, 44, 44, 44, 44, 267, 44,
321, 312, 44, 247, 292, 300, 114, 44, 44, 44,
44, 44, 114, 114, 302, 115, 313, 305, 264, 312,
301, 115, 115, 247, 320, 319, 114, 318, 317, 303,
316, 315, 314, 311, 313, 115, 310, 309, 44, 44,
44, 44, 45, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 58, 58, 58, 44,
44, 44, 44, 44, 44, 58, 58, 58, 58, 58,
58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
58, 44, 44, 44, 44, 45, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 59, 44, 44, 44, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 44, 60, 44, 44, 45, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 61, 61, 61, 44, 44, 44, 44, 44,
44, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 62,
61, 61, 61, 61, 61, 61, 61, 44, 44, 45,
308, 63, 307, 306, 64, 63, 63, 63, 63, 304,
63, 299, 63, 298, 297, 296, 295, 294, 65, 63,
293, 291, 290, 289, 288, 247, 287, 286, 285, 284,
283, 66, 282, 280, 279, 278, 277, 276, 275, 67,
274, 273, 272, 271, 270, 269, 257, 256, 63, 63,
44, 44, 45, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 70, 70, 70, 44,
44, 44, 44, 44, 44, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 44, 44, 44, 44, 45, 44, 44, 44, 44,
44, 44, 44, 44, 255, 44, 254, 253, 44, 252,
241, 240, 239, 44, 44, 44, 44, 44, 247, 238,
247, 237, 247, 236, 235, 234, 233, 231, 230, 136,
247, 247, 264, 229, 264, 228, 73, 227, 226, 225,
224, 223, 222, 247, 44, 74, 44, 44, 45, 44,
44, 44, 44, 44, 44, 44, 44, 220, 44, 219,
247, 44, 218, 217, 114, 216, 44, 44, 44, 44,
44, 215, 247, 115, 214, 213, 212, 211, 210, 209,
207, 206, 205, 204, 203, 202, 201, 200, 199, 73,
198, 197, 196, 195, 194, 193, 191, 44, 74, 44,
44, 45, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 80, 80, 80, 44, 44,
44, 44, 44, 44, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
44, 44, 44, 44, 45, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 81, 44, 82, 82, 82,
82, 82, 44, 82, 82, 82, 82, 82, 82, 82,
82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
82, 82, 82, 44, 44, 44, 44, 45, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 83, 83, 83, 83, 44, 44, 44, 44, 44,
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 44, 83, 242, 190,
242, 243, 189, 188, 244, 245, 187, 243, 246, 247,
248, 186, 243, 247, 265, 268, 247, 268, 247, 243,
247, 185, 184, 183, 182, 181, 247, 180, 179, 247,
178, 249, 177, 176, 175, 174, 173, 172, 170, 250,
114, 169, 167, 166, 165, 164, 163, 162, 243, 251,
242, 161, 242, 243, 158, 247, 244, 245, 247, 243,
243, 247, 258, 157, 243, 156, 153, 152, 151, 150,
149, 243, 148, 147, 145, 144, 143, 142, 141, 140,
139, 138, 137, 259, 136, 135, 134, 133, 132, 131,
128, 260, 127, 126, 125, 117, 109, 108, 107, 104,
243, 243, 265, 98, 247, 97, 264, 94, 264, 93,
333, 45, 45, 333, 333, 333, 333, 247, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 114, 333,
333, 333, 333, 333, 333, 333, 247, 115, 44, 44,
44, 44, 44, 44, 44, 44, 53, 53, 53, 53,
53, 53, 53, 53, 57, 57, 57, 57, 57, 57,
57, 57, 72, 72, 72, 72, 72, 72, 72, 72,
76, 76, 76, 76, 76, 76, 76, 76, 84, 84,
84, 84, 84, 84, 84, 84, 90, 333, 333, 90,
95, 95, 333, 333, 95, 96, 333, 333, 96, 99,
99, 99, 333, 99, 100, 333, 333, 100, 103, 333,
333, 103, 110, 333, 333, 110, 113, 113, 113, 333,
113, 113, 115, 115, 115, 333, 115, 115, 121, 333,
333, 121, 123, 123, 333, 123, 123, 124, 124, 124,
124, 124, 333, 124, 124, 168, 168, 168, 168, 333,
168, 325, 333, 333, 325, 43, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333
} ;
static yyconst short int yy_chk[1190] =
{ 0,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 4, 5, 6, 27, 13, 14, 27,
4, 13, 14, 28, 351, 64, 28, 23, 64, 24,
31, 340, 32, 5, 6, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 23, 7, 24, 31,
7, 32, 41, 42, 7, 7, 7, 7, 7, 7,
33, 34, 47, 59, 71, 33, 34, 91, 91, 49,
289, 41, 42, 331, 72, 47, 49, 59, 49, 33,
34, 129, 49, 72, 71, 289, 7, 7, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 330,
8, 129, 329, 8, 73, 73, 113, 8, 8, 8,
8, 8, 8, 73, 78, 113, 114, 114, 116, 133,
78, 208, 264, 78, 133, 114, 116, 146, 192, 146,
208, 264, 192, 327, 326, 116, 146, 192, 324, 8,
8, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 323, 11, 171, 322, 11,
321, 221, 221, 221, 11, 11, 11, 11, 11, 171,
221, 243, 290, 243, 244, 243, 266, 249, 171, 266,
244, 267, 319, 244, 243, 249, 267, 290, 266, 317,
267, 316, 315, 314, 249, 11, 11, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 250, 12,
312, 299, 12, 243, 281, 301, 250, 12, 12, 12,
12, 12, 281, 292, 303, 250, 299, 292, 305, 313,
301, 281, 292, 311, 309, 308, 305, 307, 306, 303,
304, 302, 300, 298, 313, 305, 297, 296, 12, 12,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 21,
295, 21, 294, 293, 21, 21, 21, 21, 21, 291,
21, 288, 21, 287, 286, 285, 284, 283, 21, 21,
282, 280, 279, 278, 277, 276, 275, 273, 272, 271,
270, 21, 269, 265, 263, 262, 261, 260, 259, 21,
257, 256, 255, 254, 253, 252, 241, 240, 21, 21,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 29, 29, 29, 29, 29, 29, 29,
29, 29, 29, 29, 239, 29, 237, 235, 29, 234,
231, 229, 228, 29, 29, 29, 29, 29, 245, 227,
245, 226, 245, 225, 224, 223, 222, 220, 219, 218,
246, 245, 246, 217, 246, 216, 29, 215, 214, 213,
212, 211, 210, 246, 29, 29, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 206, 30, 204,
245, 30, 203, 202, 246, 201, 30, 30, 30, 30,
30, 200, 246, 246, 199, 198, 197, 196, 195, 194,
191, 190, 188, 187, 186, 185, 184, 183, 182, 30,
181, 180, 179, 177, 176, 173, 170, 30, 30, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 232, 169,
232, 232, 168, 167, 232, 232, 164, 232, 232, 232,
232, 163, 232, 251, 258, 251, 258, 251, 258, 232,
258, 162, 161, 160, 159, 158, 251, 156, 154, 258,
153, 232, 152, 151, 150, 149, 148, 147, 145, 232,
232, 144, 141, 140, 139, 138, 137, 135, 232, 232,
242, 134, 242, 242, 132, 251, 242, 242, 258, 242,
242, 242, 242, 131, 242, 130, 128, 127, 125, 120,
119, 242, 118, 117, 112, 111, 109, 108, 107, 106,
105, 104, 102, 242, 101, 98, 97, 94, 93, 92,
89, 242, 88, 87, 86, 75, 69, 67, 66, 62,
242, 242, 248, 56, 248, 55, 248, 51, 248, 50,
43, 2, 1, 0, 0, 0, 0, 248, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 248, 0,
0, 0, 0, 0, 0, 0, 248, 248, 334, 334,
334, 334, 334, 334, 334, 334, 335, 335, 335, 335,
335, 335, 335, 335, 336, 336, 336, 336, 336, 336,
336, 336, 337, 337, 337, 337, 337, 337, 337, 337,
338, 338, 338, 338, 338, 338, 338, 338, 339, 339,
339, 339, 339, 339, 339, 339, 341, 0, 0, 341,
342, 342, 0, 0, 342, 343, 0, 0, 343, 344,
344, 344, 0, 344, 345, 0, 0, 345, 346, 0,
0, 346, 347, 0, 0, 347, 348, 348, 348, 0,
348, 348, 349, 349, 349, 0, 349, 349, 350, 0,
0, 350, 352, 352, 0, 352, 352, 353, 353, 353,
353, 353, 0, 353, 353, 354, 354, 354, 354, 0,
354, 355, 0, 0, 355, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333, 333,
333, 333, 333, 333, 333, 333, 333, 333, 333
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "doxytag.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#line 18 "doxytag.l"
/*
* includes
*/
#include <stdio.h>
#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include "qtbc.h"
#include <qstrlist.h>
#include <qfileinfo.h>
#include <qfile.h>
#include <qdict.h>
#include <qtextstream.h>
#include <qdir.h>
#include "version.h"
#include "suffixtree.h"
#include "searchindex.h"
#include "logos.h"
struct MemberDef
{
QCString name;
QCString anchor;
QCString args;
};
struct ClassDef
{
QCString name;
QStrList bases;
QCString fileName;
bool isFile;
QList<MemberDef> memberList;
};
QList<ClassDef> classList;
QDict<ClassDef> classDict(1009);
QList<ClassDef> fileList;
QDict<ClassDef> fileDict(1009);
static bool genTag;
static bool genIndex;
static QStrList bases;
static QCString inputString;
static int inputPosition;
static QCString yyFileName;
static int yyLineNr;
static QCString classFile;
static QCString memberRef;
static QCString memberName;
static QCString memberArgs;
static QCString className;
//static bool newClass;
static QCString docBaseLink;
static QCString docAnchor;
static QCString docRefName;
static bool nameBug;
static SearchIndex searchIndex;
#define YY_NEVER_INTERACTIVE 1
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
static int yyread(char *buf,int max_size)
{
int c=0;
while( c < max_size && inputString[inputPosition] )
{
*buf = inputString[inputPosition++] ;
c++; buf++;
}
return c;
}
static void addClass(const char *clName)
{
if (classDict[clName]==0)
{
ClassDef *cd=new ClassDef;
cd->name=clName;
cd->fileName=yyFileName;
cd->isFile=FALSE;
classList.append(cd);
classDict.insert(clName,cd);
}
}
static void addFile(const char *fName)
{
if (classDict[fName]==0)
{
ClassDef *fd=new ClassDef;
fd->name=fName;
fd->fileName=yyFileName;
fd->isFile=TRUE;
classList.append(fd);
classDict.insert(fName,fd);
}
}
static void addBases(const char *clName)
{
ClassDef *cd=0;
if (clName && (cd=classDict[clName])) cd->bases=bases;
}
static void addMember(const char *memName,const char *memRef,const char *memArgs)
{
ClassDef *cd=classList.last();
MemberDef *md;
md=new MemberDef;
md->name=memName;
md->anchor=memRef;
md->args=memArgs;
cd->memberList.append(md);
}
static void addReference()
{
//printf("addReference() key: %s ref:%s\n",
// docRefName.data(),(docBaseLink+"#"+docAnchor).data());
if (genIndex && !docRefName.isEmpty() && !docBaseLink.isEmpty())
{
if (!docAnchor.isEmpty())
searchIndex.addReference(docRefName,docBaseLink);
else
searchIndex.addReference(docRefName,docBaseLink+"#"+docAnchor);
searchIndex.addWord(docRefName,docRefName,TRUE);
}
}
QCString unhtmlify(const char *str)
{
QCString result;
const char *p=str;
char c;
while ((c=*p)!='\0')
{
if (c!='&') { result+=c; p++; }
else
{
if (strncmp(p,"&amp;",5)==0) { result+='&'; p+=5; }
else if (strncmp(p,"&lt;",4)==0) { result+='<'; p+=4; }
else if (strncmp(p,"&gt;",4)==0) { result+='>'; p+=4; }
else /* should not happen */ { result+='&'; p++; }
}
}
return result;
}
#define Start 1
#define SearchClassFile 2
#define ReadClassFile 3
#define CheckClassName 4
#define ReadClassName 5
#define SearchMemberRef 6
#define ReadMemberRef 7
#define SearchMemberName 8
#define ReadMemberName 9
#define ReadOperator 10
#define SearchBaseClasses 11
#define ReadBaseClass 12
#define SearchRefName 13
#define ReadRefName 14
#define SearchArgs 15
#define ReadArgs 16
#define SearchWords 17
#define SkipHTMLTag 18
#define CheckConstructor 19
#define SkipPreformated 20
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
if ( yyleng > 0 ) \
yy_current_buffer->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 197 "doxytag.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 334 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 1136 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
#line 199 "doxytag.l"
{
BEGIN( SearchClassFile );
}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 202 "doxytag.l"
{ // Qt variant
BEGIN( ReadClassName );
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 205 "doxytag.l"
{ // Doxygen variant
BEGIN( ReadClassName );
}
YY_BREAK
case 4:
YY_RULE_SETUP
#line 208 "doxytag.l"
{
//printf("Inherits found\n");
BEGIN( SearchBaseClasses );
}
YY_BREAK
case 5:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 15;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 212 "doxytag.l"
{ // needed due to inconsistency in the Qt docs
BEGIN( CheckConstructor );
}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 215 "doxytag.l"
{
BEGIN( SkipPreformated );
}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 218 "doxytag.l"
{
BEGIN( SearchWords );
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 221 "doxytag.l"
{
BEGIN( SkipHTMLTag );
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 224 "doxytag.l"
YY_BREAK
case 10:
YY_RULE_SETUP
#line 225 "doxytag.l"
{
//printf("tag: %s#%s ref: %s word: `%s'\n",
// docBaseLink.data(),docAnchor.data(),
// docRefName.data(),yytext);
if (genIndex && !docRefName.isEmpty() && yyleng>2)
searchIndex.addWord(docRefName,
yytext,FALSE
);
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 234 "doxytag.l"
{
BEGIN( Start );
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 237 "doxytag.l"
YY_BREAK
case 13:
YY_RULE_SETUP
#line 238 "doxytag.l"
{
QCString s=yytext;
if (s.find("::")!=-1)
{
docRefName=yytext;
addReference();
nameBug=TRUE;
}
else
{
nameBug=FALSE;
}
BEGIN( Start );
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 252 "doxytag.l"
{
docAnchor = yytext;
if (docAnchor=="details" ||
docAnchor=="_details")
{
docRefName=className.copy();
addReference();
BEGIN( Start );
}
else
{
BEGIN( SearchRefName );
}
}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 266 "doxytag.l"
{
BEGIN( ReadRefName );
}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 269 "doxytag.l"
{
if (nameBug)
BEGIN( Start );
else
BEGIN( ReadRefName );
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 276 "doxytag.l"
{ // hmm, looks impressive :-)
docRefName=unhtmlify(yytext);
addReference();
BEGIN( Start );
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 281 "doxytag.l"
{
//printf("ReadRef=%s\n",yytext);
docRefName=yytext;
addReference();
BEGIN( Start );
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 287 "doxytag.l"
{
//printf("Search %s\n",yytext);
BEGIN( ReadBaseClass );
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 291 "doxytag.l"
{
addBases(className);
BEGIN( Start );
}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 295 "doxytag.l"
{
bases.append(yytext);
BEGIN( SearchBaseClasses );
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 299 "doxytag.l"
{
BEGIN( ReadClassFile );
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 302 "doxytag.l"
{
BEGIN( ReadClassFile );
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 305 "doxytag.l"
{
className=yytext;
BEGIN( CheckClassName);
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 309 "doxytag.l"
{
//printf("className=%s\n",className.data());
addClass(className);
BEGIN( Start );
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 314 "doxytag.l"
{
//printf("className=%s\n",className.data());
addFile(className);
BEGIN( Start );
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 319 "doxytag.l"
{ // not a class file
className.resize(0);
BEGIN( Start );
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 323 "doxytag.l"
{
classFile=yytext;
BEGIN( SearchMemberRef );
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 327 "doxytag.l"
{
if (YY_START==ReadClassFile)
{
classFile=yyFileName;
}
BEGIN( ReadMemberRef );
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 334 "doxytag.l"
{
memberRef=yytext;
BEGIN( SearchMemberName );
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 338 "doxytag.l"
{ // <strong> is for qt-1.44, <b> is for qt-2.00
BEGIN( ReadMemberName );
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 341 "doxytag.l"
{
unput(*yytext);
BEGIN( ReadMemberName );
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 345 "doxytag.l"
{
memberName="operator";
BEGIN( ReadOperator );
}
YY_BREAK
case 34:
YY_RULE_SETUP
#line 349 "doxytag.l"
{ memberName+=*yytext; }
YY_BREAK
case 35:
YY_RULE_SETUP
#line 350 "doxytag.l"
{ memberName+="<"; }
YY_BREAK
case 36:
YY_RULE_SETUP
#line 351 "doxytag.l"
{ memberName+=">"; }
YY_BREAK
case 37:
YY_RULE_SETUP
#line 352 "doxytag.l"
{ memberName+=" new"; }
YY_BREAK
case 38:
YY_RULE_SETUP
#line 353 "doxytag.l"
{ memberName+=" delete"; }
YY_BREAK
case 39:
YY_RULE_SETUP
#line 354 "doxytag.l"
{ BEGIN( SearchArgs ); }
YY_BREAK
case 40:
YY_RULE_SETUP
#line 355 "doxytag.l"
{
memberName=yytext;
BEGIN( SearchArgs );
}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 359 "doxytag.l"
{
//printf("SearchArg className=%s memberName=%s\n",className.data(),memberName.data());
if (!className.isEmpty() && !memberName.isEmpty())
BEGIN( ReadArgs );
else
BEGIN( Start );
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 366 "doxytag.l"
{ memberArgs+="&"; }
YY_BREAK
case 43:
YY_RULE_SETUP
#line 367 "doxytag.l"
{ memberArgs+="<"; }
YY_BREAK
case 44:
YY_RULE_SETUP
#line 368 "doxytag.l"
{ memberArgs+=">"; }
YY_BREAK
/*
<ReadArgs>[{}] { // handle enums
memberArgs.resize(0);
addMember(memberName,memberRef,memberArgs);
if (*yytext=='}')
BEGIN( Start );
else
BEGIN( SearchClassFile );
}
*/
case 45:
YY_RULE_SETUP
#line 379 "doxytag.l"
{
//printf("adding member %s\n",memberName.data());
memberArgs=memberArgs.stripWhiteSpace();
//if (newClass)
//{
// newClass=FALSE;
// addClass(className);
//}
addMember(memberName,memberRef,memberArgs);
memberArgs.resize(0);
if (*yytext=='<')
BEGIN( SkipHTMLTag);
else
BEGIN( Start );
}
YY_BREAK
case 46:
YY_RULE_SETUP
#line 394 "doxytag.l"
{ memberArgs+=(*yytext)&0x7f; }
YY_BREAK
case 47:
YY_RULE_SETUP
#line 395 "doxytag.l"
{ BEGIN( Start ); }
YY_BREAK
case 48:
YY_RULE_SETUP
#line 396 "doxytag.l"
YY_BREAK
case 49:
YY_RULE_SETUP
#line 397 "doxytag.l"
YY_BREAK
case 50:
YY_RULE_SETUP
#line 398 "doxytag.l"
{ yyLineNr++;
if (YY_START!=SkipHTMLTag) BEGIN( Start );
}
YY_BREAK
case 51:
YY_RULE_SETUP
#line 402 "doxytag.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Start):
case YY_STATE_EOF(SearchClassFile):
case YY_STATE_EOF(ReadClassFile):
case YY_STATE_EOF(CheckClassName):
case YY_STATE_EOF(ReadClassName):
case YY_STATE_EOF(SearchMemberRef):
case YY_STATE_EOF(ReadMemberRef):
case YY_STATE_EOF(SearchMemberName):
case YY_STATE_EOF(ReadMemberName):
case YY_STATE_EOF(ReadOperator):
case YY_STATE_EOF(SearchBaseClasses):
case YY_STATE_EOF(ReadBaseClass):
case YY_STATE_EOF(SearchRefName):
case YY_STATE_EOF(ReadRefName):
case YY_STATE_EOF(SearchArgs):
case YY_STATE_EOF(ReadArgs):
case YY_STATE_EOF(SearchWords):
case YY_STATE_EOF(SkipHTMLTag):
case YY_STATE_EOF(CheckConstructor):
case YY_STATE_EOF(SkipPreformated):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 334 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 334 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 333);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
yy_current_buffer->yy_at_bol = (c == '\n');
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 402 "doxytag.l"
/*@ ----------------------------------------------------------------------------
*/
void parse(QCString &s)
{
bases.clear();
nameBug = FALSE;
//newClass = TRUE;
inputString = s;
inputPosition = 0;
yyLineNr = 0;
tagYYrestart( tagYYin );
BEGIN( Start );
tagYYlex();
//printf("Number of lines scanned: %d\n",yyLineNr);
}
void parseFile(QFileInfo &fi)
{
fprintf(stderr,"Parsing file %s...\n",fi.fileName().data());
QFile f(fi.absFilePath().data());
if (f.open(IO_ReadOnly))
{
yyFileName = fi.fileName();
className.resize(0);
memberName.resize(0);
//printf("Parsing file %s...\n",fi.fileName().data());
QCString input(fi.size()+1);
docBaseLink=fi.fileName();
docRefName=fi.fileName().copy();
searchIndex.addReference(docRefName,docBaseLink);
searchIndex.addWord(docRefName,docRefName,TRUE);
f.readBlock(input.data(),fi.size());
input.at(fi.size())='\0';
parse(input);
}
else
{
fprintf(stderr,"Warning: Cannot open file %s\n",fi.fileName().data());
}
}
void parseFileOrDir(const char *fileName)
{
QFileInfo fi(fileName);
if (fi.exists())
{
if (fi.isFile())
{
parseFile(fi);
}
else if (fi.isDir())
{
QDir dir(fileName);
dir.setFilter( QDir::Files );
dir.setNameFilter( "*.html" );
const QFileInfoList *list = dir.entryInfoList();
QFileInfoListIterator it( *list );
QFileInfo *cfi;
for ( it.toFirst() ; (cfi=it.current()) ; ++it)
{
if (cfi->isFile())
{
parseFile(*cfi);
}
}
}
}
else
{
fprintf(stderr,"Warning: File %s does not exist\n",fileName);
}
}
void usage(const char *name)
{
fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-2000\n\n",
versionString);
fprintf(stderr," Generates a tag file and/or a search index for a set of HTML files\n\n");
fprintf(stderr,"Usage: %s [-t tag_file] [-s index_file] [ html_file [html_file...] ]\n",name);
fprintf(stderr,"Options:\n");
fprintf(stderr," -t <tag_file> Generate tag file <tag_file>.\n");
fprintf(stderr," -s <index_file> Generate search index <index_file>.\n\n");
fprintf(stderr,"If no HTML files are given all files in the current dir that\n"
"have a .html extension are parsed.\n\n");
exit(1);
}
const char *getArg(int argc,char **argv,int &optind,const char c)
{
char *s=0;
if (strlen(&argv[optind][2])>0)
s=&argv[optind][2];
else if (optind+1<argc)
s=argv[++optind];
else
{
fprintf(stderr,"option -%c requires an argument\n",c);
exit(1);
}
return s;
}
int main(int argc,char **argv)
{
QCString tagName;
QCString indexName;
int optind=1;
const char *arg;
while (optind<argc && argv[optind][0]=='-')
{
switch(argv[optind][1])
{
case 't':
arg=getArg(argc,argv,optind,'t');
tagName=arg;
break;
case 's':
arg=getArg(argc,argv,optind,'s');
indexName=arg;
break;
case 'h':
case '?':
usage(argv[0]);
break;
default:
fprintf(stderr,"Unknown option -%c\n",argv[optind][1]);
usage(argv[0]);
}
optind++;
}
genTag = !tagName.isEmpty();
genIndex = !indexName.isEmpty();
if (!genTag && !genIndex)
{
fprintf(stderr,"Nothing to do !\n\n");
usage(argv[0]);
}
int i;
if (optind>=argc)
{
parseFileOrDir(".");
}
else
{
for (i=optind;i<argc;i++)
{
parseFileOrDir(argv[i]);
}
}
if (genIndex)
{
//printf("Writing search index\n");
if (!searchIndex.saveIndex(indexName))
{
fprintf(stderr,"Error: Could not write search index\n");
}
QFileInfo fi(indexName);
if (fi.exists())
{
QCString dir=convertToQCString(fi.dir().absPath());
fi.setFile(dir+"/search.gif");
if (!fi.exists()) writeSearchButton(dir);
fi.setFile(dir+"/doxygen.gif");
if (!fi.exists()) writeLogo(dir);
fi.setFile(dir+"/search.cgi");
if (!fi.exists())
{
QFile f(dir+"/search.cgi");
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
t << "#!/bin/sh" << endl
<< "DOXYSEARCH=" << endl
<< "DOXYPATH=" << endl
<< "if [ -f $DOXYSEARCH ]" << endl
<< "then" << endl
<< " $DOXYSEARCH $DOXYPATH" << endl
<< "else" << endl
<< " echo \"Content-Type: text/html\"" << endl
<< " echo \"\"" << endl
<< " echo \"<H1>Error: $DOXYSEARCH not found. Check cgi script!\"" << endl
<< "fi" << endl;
f.close();
}
else
{
fprintf(stderr,"Error: could not open file %s for writing\n",(dir+"/search.cgi").data());
}
}
}
}
if (genTag)
{
QFile f(tagName);
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
ClassDef *cd=classList.first();
while (cd)
{
if (cd->isFile) t << "&"; else t << ">";
t << cd->name << ":";
char *base=cd->bases.first();
while (base)
{
t << base << "?";
base=cd->bases.next();
}
if (!cd->isFile) t << " \"" << cd->fileName << "\"";
t << endl;
MemberDef *md=cd->memberList.first();
while (md)
{
t << md->name << " " << md->anchor << " \"" << md->args << "\"" << endl;
md=cd->memberList.next();
}
cd=classList.next();
}
}
else
{
fprintf(stderr,"Error: Could not write tag file %s\n",tagName.data());
}
}
return 0;
}
extern "C" {
int tagYYwrap() { return 1 ; }
};
...@@ -33,7 +33,9 @@ struct BaseInfo ...@@ -33,7 +33,9 @@ struct BaseInfo
struct Argument struct Argument
{ {
/*! Construct a new argument. */
Argument() {} Argument() {}
/*! Copy an argument (does a deep copy of all strings). */
Argument(const Argument &a) Argument(const Argument &a)
{ {
attrib=a.attrib.copy(); attrib=a.attrib.copy();
...@@ -43,6 +45,7 @@ struct Argument ...@@ -43,6 +45,7 @@ struct Argument
docs=a.docs.copy(); docs=a.docs.copy();
array=a.array.copy(); array=a.array.copy();
} }
/* Assignment of an argument (does a deep copy of all strings). */
Argument &operator=(const Argument &a) Argument &operator=(const Argument &a)
{ {
if (this!=&a) if (this!=&a)
...@@ -56,17 +59,20 @@ struct Argument ...@@ -56,17 +59,20 @@ struct Argument
} }
return *this; return *this;
} }
/*! return TRUE if this argument is documentation and the argument has a
* non empty name.
*/
bool hasDocumentation() const bool hasDocumentation() const
{ {
return !name.isEmpty() && !docs.isEmpty(); return !name.isEmpty() && !docs.isEmpty();
} }
QCString attrib; // argument attribute (IDL only) QCString attrib; /*!< Argument's attribute (IDL only) */
QCString type; // argument type QCString type; /*!< Argument's type */
QCString name; // argument name (if any) QCString name; /*!< Argument's name (may be empty) */
QCString array; // argument array specifier (if any) QCString array; /*!< Argument's array specifier (may be empty) */
QCString defval; // argument default value (if any) QCString defval; /*!< Argument's default value (may be empty) */
QCString docs; // arguments documentation (if any) QCString docs; /*!< Argument's documentation (may be empty) */
}; };
class ArgumentList : public QList<Argument> class ArgumentList : public QList<Argument>
......
...@@ -479,7 +479,7 @@ void FileDef::insertMember(MemberDef *md) ...@@ -479,7 +479,7 @@ void FileDef::insertMember(MemberDef *md)
/*! Adds compound definition \a cd to the list of all compounds of this file */ /*! Adds compound definition \a cd to the list of all compounds of this file */
void FileDef::insertClass(ClassDef *cd) void FileDef::insertClass(ClassDef *cd)
{ {
classList->append(cd); classList->inSort(cd);
} }
/*! Adds namespace definition \a nd to the list of all compounds of this file */ /*! Adds namespace definition \a nd to the list of all compounds of this file */
...@@ -487,7 +487,7 @@ void FileDef::insertNamespace(NamespaceDef *nd) ...@@ -487,7 +487,7 @@ void FileDef::insertNamespace(NamespaceDef *nd)
{ {
if (!nd->name().isEmpty() && namespaceDict->find(nd->name())==0) if (!nd->name().isEmpty() && namespaceDict->find(nd->name())==0)
{ {
namespaceList->append(nd); namespaceList->inSort(nd);
namespaceDict->insert(nd->name(),nd); namespaceDict->insert(nd->name(),nd);
} }
} }
...@@ -541,11 +541,10 @@ void FileDef::addUsingDirective(NamespaceDef *nd) ...@@ -541,11 +541,10 @@ void FileDef::addUsingDirective(NamespaceDef *nd)
void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local) void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local)
{ {
//printf("FileDef::addIncludeDependency(%p,%s,%d)\n",fd,incName,local);
QCString iName = fd ? fd->absFilePath().data() : incName; QCString iName = fd ? fd->absFilePath().data() : incName;
if (!iName.isEmpty() && includeDict->find(iName)==0) if (!iName.isEmpty() && includeDict->find(iName)==0)
{ {
//printf("Adding include dependency `%s' to `%s'\n",
// fd->name().data(),name().data());
IncludeInfo *ii = new IncludeInfo; IncludeInfo *ii = new IncludeInfo;
ii->fileDef = fd; ii->fileDef = fd;
ii->includeName = incName; ii->includeName = incName;
...@@ -574,8 +573,8 @@ int FileList::compareItems(GCI item1, GCI item2) ...@@ -574,8 +573,8 @@ int FileList::compareItems(GCI item1, GCI item2)
FileDef *f2=(FileDef *)item2; FileDef *f2=(FileDef *)item2;
ASSERT(f1!=0 && f2!=0); ASSERT(f1!=0 && f2!=0);
return Config::fullPathNameFlag ? return Config::fullPathNameFlag ?
strcmp(f1->absFilePath(),f2->absFilePath()) : strcasecmp(f1->absFilePath(),f2->absFilePath()) :
strcmp(f1->name(),f2->name()); strcasecmp(f1->name(),f2->name());
} }
/*! Create a file list iterator. */ /*! Create a file list iterator. */
......
...@@ -90,49 +90,6 @@ QCString abbreviate(const char *s,const char *name) ...@@ -90,49 +90,6 @@ QCString abbreviate(const char *s,const char *name)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void initBaseClassHierarchy(BaseClassList *bcl)
{
BaseClassListIterator bcli(*bcl);
for ( ; bcli.current(); ++bcli)
{
ClassDef *cd=bcli.current()->classDef;
if (cd->baseClasses()->count()==0) // no base classes => new root
{
initBaseClassHierarchy(cd->baseClasses());
}
cd->visited=FALSE;
}
}
//----------------------------------------------------------------------------
void initClassHierarchy(ClassList *cl)
{
ClassListIterator cli(*cl);
ClassDef *cd;
for ( ; (cd=cli.current()); ++cli)
{
cd->visited=FALSE;
initBaseClassHierarchy(cd->baseClasses());
}
}
//----------------------------------------------------------------------------
bool hasVisibleRoot(BaseClassList *bcl)
{
BaseClassListIterator bcli(*bcl);
for ( ; bcli.current(); ++bcli)
{
ClassDef *cd=bcli.current()->classDef;
if (cd->isVisibleInHierarchy()) return TRUE;
hasVisibleRoot(cd->baseClasses());
}
return FALSE;
}
//----------------------------------------------------------------------------
void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
{ {
HtmlHelp *htmlHelp=0; HtmlHelp *htmlHelp=0;
......
...@@ -1099,6 +1099,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1099,6 +1099,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ClassDef *bcd=0; ClassDef *bcd=0;
if (bmd && (bcd=bmd->memberClass())) if (bmd && (bcd=bmd->memberClass()))
{ {
#if 0
if (virt!=Normal) // search for virtual member of the deepest base class if (virt!=Normal) // search for virtual member of the deepest base class
{ {
MemberDef *lastBmd=bmd; MemberDef *lastBmd=bmd;
...@@ -1112,6 +1113,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1112,6 +1113,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
lastBmd=lastBmd->reimplements(); lastBmd=lastBmd->reimplements();
} }
} }
#endif
// write class that contains a member that is reimplemented by this one // write class that contains a member that is reimplemented by this one
if (bcd->isLinkable()) if (bcd->isLinkable())
{ {
......
...@@ -36,7 +36,7 @@ int MemberList::compareItems(GCI item1, GCI item2) ...@@ -36,7 +36,7 @@ int MemberList::compareItems(GCI item1, GCI item2)
{ {
MemberDef *c1=(MemberDef *)item1; MemberDef *c1=(MemberDef *)item1;
MemberDef *c2=(MemberDef *)item2; MemberDef *c2=(MemberDef *)item2;
return strcmp(c1->name(),c2->name()); return strcasecmp(c1->name(),c2->name());
} }
void MemberList::countDecMembers() void MemberList::countDecMembers()
......
...@@ -91,7 +91,7 @@ class NamespaceList : public QList<NamespaceDef> ...@@ -91,7 +91,7 @@ class NamespaceList : public QList<NamespaceDef>
~NamespaceList() {} ~NamespaceList() {}
int compareItems(GCI item1,GCI item2) int compareItems(GCI item1,GCI item2)
{ {
return strcmp(((NamespaceDef *)item1)->name(), return strcasecmp(((NamespaceDef *)item1)->name(),
((NamespaceDef *)item2)->name() ((NamespaceDef *)item2)->name()
); );
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -818,6 +818,7 @@ static void readIncludeFile(const QCString &inc) ...@@ -818,6 +818,7 @@ static void readIncludeFile(const QCString &inc)
FILE *f; FILE *f;
QCString oldFileName = g_yyFileName.copy(); QCString oldFileName = g_yyFileName.copy();
FileDef *oldFileDef = g_yyFileDef; FileDef *oldFileDef = g_yyFileDef;
//printf("Searching for `%s'\n",incFileName.data());
if ((f=findFile(incFileName))) // see if the include file can be found if ((f=findFile(incFileName))) // see if the include file can be found
{ {
#if SHOW_INCLUDES #if SHOW_INCLUDES
...@@ -845,8 +846,10 @@ static void readIncludeFile(const QCString &inc) ...@@ -845,8 +846,10 @@ static void readIncludeFile(const QCString &inc)
{ {
if (oldFileDef) if (oldFileDef)
{ {
bool ambig;
FileDef *fd = findFileDef(&inputNameDict,incFileName,ambig);
// add include dependency to the file in which the #include was found // add include dependency to the file in which the #include was found
oldFileDef->addIncludeDependency(0,incFileName,localInclude); oldFileDef->addIncludeDependency(fd,incFileName,localInclude);
} }
#if SHOW_INCLUDES #if SHOW_INCLUDES
msg("#include %s: not found! skipping...\n",incFileName.data()); msg("#include %s: not found! skipping...\n",incFileName.data());
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -148,6 +148,8 @@ static QCString baseName; ...@@ -148,6 +148,8 @@ static QCString baseName;
static QCString *specName; static QCString *specName;
static QCString formulaText; static QCString formulaText;
static QCString sectionRef; static QCString sectionRef;
static bool insideIDL = FALSE;
static bool insideCppQuote = FALSE;
// state variable for reading the argument list of a function // state variable for reading the argument list of a function
static int argRoundCount; static int argRoundCount;
...@@ -960,6 +962,8 @@ VAR [vV][aA][rR] ...@@ -960,6 +962,8 @@ VAR [vV][aA][rR]
%x ClassDocBrief %x ClassDocBrief
%x ClassDocOverload %x ClassDocOverload
%x ClassDefineArgs %x ClassDefineArgs
%x CppQuote
%x EndCppQuote
%x GroupDocArg1 %x GroupDocArg1
%x GroupDocArg2 %x GroupDocArg2
%x GroupName %x GroupName
...@@ -1060,6 +1064,7 @@ VAR [vV][aA][rR] ...@@ -1060,6 +1064,7 @@ VAR [vV][aA][rR]
for( i = 0 ; yytext[i+1] != 6 ; i++ ) for( i = 0 ; yytext[i+1] != 6 ; i++ )
yyFileName[i] = yytext[i+1] ; yyFileName[i] = yytext[i+1] ;
yyFileName[i] = 0 ; yyFileName[i] = 0 ;
insideIDL = i>4 && strcmp(&yyFileName[i-4],".idl")==0;
msg("Parsing file %s...\n",yyFileName); msg("Parsing file %s...\n",yyFileName);
current_root = global_root ; current_root = global_root ;
initParser(); initParser();
...@@ -1719,7 +1724,7 @@ VAR [vV][aA][rR] ...@@ -1719,7 +1724,7 @@ VAR [vV][aA][rR]
generateRef(*outDoc,className, generateRef(*outDoc,className,
removeRedundantWhiteSpace(oName),inSeeBlock); removeRedundantWhiteSpace(oName),inSeeBlock);
} }
<DocScan>("http:"|"ftp:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); } <DocScan>("http:"|"ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); }
<DocScan>[a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); } <DocScan>[a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); }
<DocScan>{FILEMASK} { <DocScan>{FILEMASK} {
generateFileRef(*outDoc,yytext); generateFileRef(*outDoc,yytext);
...@@ -2413,6 +2418,12 @@ VAR [vV][aA][rR] ...@@ -2413,6 +2418,12 @@ VAR [vV][aA][rR]
*currentTemplateSpec+=*yytext; *currentTemplateSpec+=*yytext;
} }
<FindMembers,FindMemberName>{SCOPENAME} { <FindMembers,FindMemberName>{SCOPENAME} {
if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0)
{
BEGIN(CppQuote);
}
else
{
lineCount(); lineCount();
if (YY_START==FindMembers) if (YY_START==FindMembers)
{ {
...@@ -2429,6 +2440,15 @@ VAR [vV][aA][rR] ...@@ -2429,6 +2440,15 @@ VAR [vV][aA][rR]
else else
BEGIN(FindMembers); BEGIN(FindMembers);
} }
}
<CppQuote>"("{B}*"\"" {
insideCppQuote=TRUE;
BEGIN(FindMembers);
}
<EndCppQuote>")" {
insideCppQuote=FALSE;
BEGIN(FindMembers);
}
<FindMembers>{B}*"#" { lastCPPContext = YY_START; <FindMembers>{B}*"#" { lastCPPContext = YY_START;
BEGIN( SkipCPP ) ; BEGIN( SkipCPP ) ;
} }
...@@ -2482,9 +2502,16 @@ VAR [vV][aA][rR] ...@@ -2482,9 +2502,16 @@ VAR [vV][aA][rR]
yyLineNr++; yyLineNr++;
} }
<DefineEnd>\" { <DefineEnd>\" {
if (insideIDL && insideCppQuote)
{
BEGIN(EndCppQuote);
}
else
{
lastStringContext=DefineEnd; lastStringContext=DefineEnd;
BEGIN(SkipString); BEGIN(SkipString);
} }
}
<DefineEnd>. <DefineEnd>.
<FindMembers>[*&]+ { current->name += yytext ; } <FindMembers>[*&]+ { current->name += yytext ; }
...@@ -2579,11 +2606,18 @@ VAR [vV][aA][rR] ...@@ -2579,11 +2606,18 @@ VAR [vV][aA][rR]
BEGIN(lastInitializerContext); BEGIN(lastInitializerContext);
} }
<ReadInitializer>\" { <ReadInitializer>\" {
if (insideIDL && insideCppQuote)
{
BEGIN(EndCppQuote);
}
else
{
lastStringContext=YY_START; lastStringContext=YY_START;
current->initializer+=*yytext; current->initializer+=*yytext;
pCopyQuotedString=&current->initializer; pCopyQuotedString=&current->initializer;
BEGIN(CopyString); BEGIN(CopyString);
} }
}
<ReadInitializer>"'"\\[0-7]{1,3}"'" <ReadInitializer>"'"\\[0-7]{1,3}"'"
<ReadInitializer>"'"\\."'" <ReadInitializer>"'"\\."'"
<ReadInitializer>"'"."'" <ReadInitializer>"'"."'"
...@@ -3578,6 +3612,10 @@ VAR [vV][aA][rR] ...@@ -3578,6 +3612,10 @@ VAR [vV][aA][rR]
} }
<ClassVar>[;=*&] { <ClassVar>[;=*&] {
unput(*yytext); unput(*yytext);
if (isTypedef) // typedef of a class, put typedef keyword back
{
current->type.prepend("typedef");
}
BEGIN( FindMembers ); BEGIN( FindMembers );
} }
<ClassName,ClassVar>{B}*"{"{B}* { current->fileName = yyFileName ; <ClassName,ClassVar>{B}*"{"{B}* { current->fileName = yyFileName ;
...@@ -3911,6 +3949,7 @@ VAR [vV][aA][rR] ...@@ -3911,6 +3949,7 @@ VAR [vV][aA][rR]
current->name = yytext; current->name = yytext;
newDocState(); newDocState();
} }
<NameSpaceDocArg1>"\\"{B}*"\n" { yyLineNr++; }
<NameSpaceDocArg1>"\n" { <NameSpaceDocArg1>"\n" {
warn("Warning: missing argument after " warn("Warning: missing argument after "
"\\namespace at line %d of %s.\n",yyLineNr,yyFileName); "\\namespace at line %d of %s.\n",yyLineNr,yyFileName);
...@@ -3935,6 +3974,7 @@ VAR [vV][aA][rR] ...@@ -3935,6 +3974,7 @@ VAR [vV][aA][rR]
} }
BEGIN( ClassDocArg2 ); BEGIN( ClassDocArg2 );
} }
<ClassDocArg1>"\\"{B}*"\n" { yyLineNr++; }
<ClassDocArg1>"\n" { <ClassDocArg1>"\n" {
warn("Warning: missing argument after " warn("Warning: missing argument after "
"\\class at line %d of %s.\n",yyLineNr,yyFileName); "\\class at line %d of %s.\n",yyLineNr,yyFileName);
...@@ -3947,6 +3987,7 @@ VAR [vV][aA][rR] ...@@ -3947,6 +3987,7 @@ VAR [vV][aA][rR]
current->name=current->name.left(current->name.length()-5); current->name=current->name.left(current->name.length()-5);
BEGIN(GroupDocArg2); BEGIN(GroupDocArg2);
} }
<GroupDocArg1>"\\"{B}*"\n" { yyLineNr++; }
<GroupDocArg1>"\n" { <GroupDocArg1>"\n" {
warn("Warning: missing argument after " warn("Warning: missing argument after "
"\\defgroup at line %d of %s.\n",yyLineNr,yyFileName); "\\defgroup at line %d of %s.\n",yyLineNr,yyFileName);
...@@ -3958,6 +3999,7 @@ VAR [vV][aA][rR] ...@@ -3958,6 +3999,7 @@ VAR [vV][aA][rR]
current->type = current->type.stripWhiteSpace(); current->type = current->type.stripWhiteSpace();
newDocState(); newDocState();
} }
<GroupDocArg2>"\\"{B}*"\n" { yyLineNr++; }
<GroupDocArg2>"\n" { <GroupDocArg2>"\n" {
newDocState(); newDocState();
} }
...@@ -3966,7 +4008,8 @@ VAR [vV][aA][rR] ...@@ -3966,7 +4008,8 @@ VAR [vV][aA][rR]
current->includeFile = stripQuotes(yytext); current->includeFile = stripQuotes(yytext);
BEGIN( ClassDocArg3 ); BEGIN( ClassDocArg3 );
} }
<ClassDocArg2>{BL} { yyLineNr++; <ClassDocArg2>"\\"{B}*"\n" { yyLineNr++; }
<ClassDocArg2>"\n" { yyLineNr++;
newDocState(); newDocState();
} }
<ClassDocArg3>[<]?{FILE}[>]? { <ClassDocArg3>[<]?{FILE}[>]? {
...@@ -3974,13 +4017,15 @@ VAR [vV][aA][rR] ...@@ -3974,13 +4017,15 @@ VAR [vV][aA][rR]
current->includeName = yytext; current->includeName = yytext;
newDocState(); newDocState();
} }
<ClassDocArg3>{BL} { yyLineNr++; <ClassDocArg3>"\\"{B}*"\n" { yyLineNr++; }
<ClassDocArg3>"\n" { yyLineNr++;
newDocState(); newDocState();
} }
<FileDocArg1>{FILE} { <FileDocArg1>{FILE} {
current->name = stripQuotes(yytext); current->name = stripQuotes(yytext);
newDocState(); newDocState();
} }
<FileDocArg1>"\\"{B}*"\n" { yyLineNr++; }
<FileDocArg1>"\n" { <FileDocArg1>"\n" {
current->name = yyFileName; current->name = yyFileName;
yyLineNr++; yyLineNr++;
...@@ -3990,6 +4035,7 @@ VAR [vV][aA][rR] ...@@ -3990,6 +4035,7 @@ VAR [vV][aA][rR]
current->name = stripQuotes(yytext); current->name = stripQuotes(yytext);
BEGIN( PageDocArg2 ); BEGIN( PageDocArg2 );
} }
<PageDocArg1>"\\"{B}*"\n" { yyLineNr++; }
<PageDocArg1>"\n" { <PageDocArg1>"\n" {
warn("Warning: missing argument after " warn("Warning: missing argument after "
"\\page at line %d of %s.\n",yyLineNr,yyFileName); "\\page at line %d of %s.\n",yyLineNr,yyFileName);
...@@ -4009,6 +4055,7 @@ VAR [vV][aA][rR] ...@@ -4009,6 +4055,7 @@ VAR [vV][aA][rR]
} }
newDocState(); newDocState();
} }
<EnumDocArg1>"\\"{B}*"\n" { yyLineNr++; }
<EnumDocArg1>"\n" { <EnumDocArg1>"\n" {
warn("Warning: missing argument after " warn("Warning: missing argument after "
"\\enum at line %d of %s.\n",yyLineNr,yyFileName); "\\enum at line %d of %s.\n",yyLineNr,yyFileName);
...@@ -4303,6 +4350,7 @@ VAR [vV][aA][rR] ...@@ -4303,6 +4350,7 @@ VAR [vV][aA][rR]
<ClassDefineArgs>. { <ClassDefineArgs>. {
current->args+= yytext; current->args+= yytext;
} }
<ClassDocFunc>"\\"{B}*"\n" { yyLineNr++; }
<ClassDocFunc>"\n" { <ClassDocFunc>"\n" {
yyLineNr++; yyLineNr++;
current->name = current->name.stripWhiteSpace(); current->name = current->name.stripWhiteSpace();
...@@ -4450,6 +4498,12 @@ VAR [vV][aA][rR] ...@@ -4450,6 +4498,12 @@ VAR [vV][aA][rR]
} }
<SkipComment>[^\*\n]+ <SkipComment>[^\*\n]+
<*>\n { yyLineNr++ ; } <*>\n { yyLineNr++ ; }
<*>\" {
if (insideIDL && insideCppQuote)
{
BEGIN(EndCppQuote);
}
}
<*>. <*>.
<SkipComment>"//"|"/*" <SkipComment>"//"|"/*"
<*>"/*" { lastCContext = YY_START ; <*>"/*" { lastCContext = YY_START ;
......
#define yy_create_buffer tagYY_create_buffer
#define yy_delete_buffer tagYY_delete_buffer
#define yy_scan_buffer tagYY_scan_buffer
#define yy_scan_string tagYY_scan_string
#define yy_scan_bytes tagYY_scan_bytes
#define yy_flex_debug tagYY_flex_debug
#define yy_init_buffer tagYY_init_buffer
#define yy_flush_buffer tagYY_flush_buffer
#define yy_load_buffer_state tagYY_load_buffer_state
#define yy_switch_to_buffer tagYY_switch_to_buffer
#define yyin tagYYin
#define yyleng tagYYleng
#define yylex tagYYlex
#define yyout tagYYout
#define yyrestart tagYYrestart
#define yytext tagYYtext
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header$
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
#define yywrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 20
#define YY_END_OF_BUFFER 21
static yyconst short int yy_accept[69] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 21, 18, 19, 3,
2, 1, 18, 5, 6, 7, 18, 8, 18, 18,
18, 18, 17, 18, 12, 18, 14, 13, 0, 4,
6, 0, 8, 0, 11, 0, 15, 0, 9, 0,
10, 0, 16, 0, 13, 0, 0, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 3, 1, 4, 1, 1, 5, 6, 1, 1,
1, 1, 7, 1, 7, 7, 7, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 9, 1, 1,
1, 10, 11, 1, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
1, 7, 1, 1, 12, 1, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 1, 1, 1, 13, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[14] =
{ 0,
1, 2, 1, 1, 1, 1, 3, 4, 5, 1,
6, 4, 1
} ;
static yyconst short int yy_base[81] =
{ 0,
51, 50, 47, 0, 46, 12, 21, 0, 32, 35,
38, 41, 38, 43, 48, 53, 59, 0, 64, 69,
80, 0, 91, 94, 97, 100, 47, 153, 153, 153,
153, 153, 41, 153, 0, 153, 37, 153, 29, 26,
23, 22, 153, 19, 153, 24, 23, 153, 23, 153,
0, 21, 153, 15, 12, 11, 153, 10, 0, 9,
8, 5, 153, 11, 153, 2, 0, 153, 104, 110,
116, 122, 0, 128, 131, 133, 136, 138, 140, 146
} ;
static yyconst short int yy_def[81] =
{ 0,
69, 69, 69, 69, 69, 69, 69, 7, 69, 69,
70, 70, 7, 7, 7, 7, 7, 17, 7, 7,
7, 21, 69, 69, 71, 71, 68, 68, 68, 68,
68, 68, 72, 68, 73, 68, 74, 68, 75, 76,
77, 78, 68, 79, 68, 80, 80, 68, 72, 68,
73, 74, 68, 75, 68, 76, 68, 77, 58, 78,
68, 79, 68, 80, 68, 75, 78, 0, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68
} ;
static yyconst short int yy_nxt[167] =
{ 0,
68, 29, 68, 51, 30, 31, 68, 68, 68, 32,
68, 33, 33, 29, 65, 63, 67, 61, 59, 57,
66, 34, 29, 55, 53, 50, 65, 65, 35, 63,
61, 59, 35, 29, 57, 36, 29, 55, 36, 29,
53, 38, 29, 50, 38, 39, 68, 29, 29, 39,
39, 29, 29, 68, 39, 40, 68, 68, 68, 40,
40, 68, 68, 68, 40, 41, 41, 41, 68, 68,
41, 42, 68, 68, 68, 42, 42, 68, 68, 68,
42, 43, 68, 68, 68, 68, 68, 44, 68, 68,
68, 44, 29, 68, 45, 29, 68, 45, 47, 68,
48, 47, 68, 48, 28, 28, 28, 28, 28, 28,
37, 37, 37, 37, 37, 37, 46, 46, 46, 46,
46, 46, 49, 68, 49, 49, 49, 49, 52, 68,
52, 52, 52, 52, 54, 54, 56, 56, 58, 58,
58, 60, 60, 62, 68, 62, 64, 64, 64, 64,
64, 64, 27, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68
} ;
static yyconst short int yy_chk[167] =
{ 0,
0, 4, 0, 73, 4, 4, 0, 0, 67, 4,
66, 4, 4, 6, 64, 62, 61, 60, 58, 56,
55, 6, 7, 54, 52, 49, 47, 46, 7, 44,
42, 41, 7, 9, 40, 9, 10, 39, 10, 11,
37, 11, 12, 33, 12, 13, 27, 5, 3, 13,
14, 2, 1, 0, 14, 15, 0, 0, 0, 15,
16, 0, 0, 0, 16, 17, 17, 17, 0, 0,
17, 19, 0, 0, 0, 19, 20, 0, 0, 0,
20, 21, 0, 0, 0, 0, 0, 21, 0, 0,
0, 21, 23, 0, 23, 24, 0, 24, 25, 0,
25, 26, 0, 26, 69, 69, 69, 69, 69, 69,
70, 70, 70, 70, 70, 70, 71, 71, 71, 71,
71, 71, 72, 0, 72, 72, 72, 72, 74, 0,
74, 74, 74, 74, 75, 75, 76, 76, 77, 77,
77, 78, 78, 79, 0, 79, 80, 80, 80, 80,
80, 80, 68, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "tag.l"
#define INITIAL 0
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#line 18 "tag.l"
/*
* includes
*/
#include <stdio.h>
#include "qtbc.h"
#include <qfileinfo.h>
#include "classdef.h"
#include "filedef.h"
#include "namespacedef.h"
#include "memberdef.h"
#include "doxygen.h"
#include "util.h"
#include "message.h"
#include "defargs.h"
#define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1
static int yyLineNr;
static QCString className;
static QCString fileName;
static QCString namespaceName;
static QCString tagName;
static QCString memberName;
static QCString anchorName;
static QCString argString;
static ClassDef *cd;
static FileDef *fd;
static NamespaceDef *nd;
static void addClass(const char *name,const char *fileName)
{
//printf("adding class %s\n",name);
if (name!=0 && strlen(name)>0 && classDict[name]==0)
{
cd = new ClassDef(name,ClassDef::Class,tagName,fileName);
fd = 0;
nd = 0;
classList.inSort(cd);
classDict.insert(className,cd);
}
}
static void addFile(const char *name)
{
//printf("adding file %s tagName=`%s'\n",name,tagName.data());
fd = new FileDef(0,name,tagName);
FileName *mn;
if ((mn=inputNameDict[name]))
{
mn->append(fd);
}
else
{
mn = new FileName(name,name);
mn->append(fd);
inputNameList.inSort(mn);
inputNameDict.insert(name,mn);
}
cd = 0;
nd = 0;
//fileList.inSort(fd);
//fileDict.insert(fileName,fd);
}
static void addNamespace(const char *name)
{
if ((nd=namespaceDict[name])==0)
{
// TODO: we assume that each namespace is limited to a single tagfile.
// since namespace are open, this need not to be the case. As a result
// namespace may contain members that are located in
// different namespaces!
nd = new NamespaceDef(name,tagName);
namespaceList.inSort(nd);
namespaceDict.insert(name,nd);
}
cd = 0;
fd = 0;
}
static void addMember(const char *name,const char *anchor,const char *args)
{
//printf("adding member `%s' `%s'\n",name,anchor);
if (cd || fd)
{
MemberNameDict *mnd=0;
MemberNameList *mnl=0;
MemberDef *md;
ArgumentList *argList = new ArgumentList;
stringToArgumentList(args,argList);
md=new MemberDef(0,name,args,0,Public,Normal,FALSE,FALSE,
MemberDef::Function,0,argList);
delete argList;
md->setAnchor(anchor);
md->setReference(tagName);
if (cd) // member of a class
{
md->setMemberClass(cd);
cd->insertMember(md);
mnd=&memberNameDict;
mnl=&memberNameList;
}
else if (nd) // member of a namespace
{
md->setNamespace(nd);
nd->insertMember(md);
mnd=&functionNameDict;
mnl=&functionNameList;
}
else // member of a file
{
md->setFileDef(fd);
fd->insertMember(md);
mnd=&functionNameDict;
mnl=&functionNameList;
}
MemberName *mn = 0;
if ((mn=(*mnd)[memberName]))
{
//printf("mn->inSort()\n");
mn->append(md);
}
else
{
//printf("mn->append()\n");
mn=new MemberName(memberName);
mn->append(md);
//printf("Adding memberName=%s\n",mn->memberName());
mnl->inSort(mn);
mnd->insert(memberName,mn);
}
}
}
/* -----------------------------------------------------------------
*/
#define Pass1 1
#define Pass2 2
#define AnchorName 3
#define ArgString1 4
#define ArgString2 5
#define ClassName1 6
#define ClassName2 7
#define FileName 8
#define NamespaceName 9
#define BaseClasses 10
#define ClassFile1 11
#define ClassFile2 12
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
if ( yyleng > 0 ) \
yy_current_buffer->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 180 "tag.l"
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 69 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 153 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
#line 182 "tag.l"
{ // start of a class
BEGIN(ClassName1);
}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 185 "tag.l"
{ // start of a file
BEGIN(FileName);
}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 188 "tag.l"
{ // start of a namespace
BEGIN(NamespaceName);
}
YY_BREAK
case 4:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 191 "tag.l"
{
memberName=yytext;
BEGIN(AnchorName);
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 195 "tag.l"
{
BEGIN(ClassName2);
}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 198 "tag.l"
{
anchorName=yytext;
BEGIN(ArgString1);
}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 202 "tag.l"
{
BEGIN(ArgString2);
}
YY_BREAK
case 8:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 205 "tag.l"
{
argString=yytext;
addMember(memberName,anchorName,argString);
BEGIN(Pass1);
}
YY_BREAK
case 9:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 210 "tag.l"
{
fileName=yytext;
addFile(yytext);
BEGIN(Pass1);
}
YY_BREAK
case 10:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 215 "tag.l"
{
namespaceName=yytext;
addNamespace(yytext);
BEGIN(Pass1);
}
YY_BREAK
case 11:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 220 "tag.l"
{
className=yytext;
BEGIN(ClassFile1);
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 224 "tag.l"
{
BEGIN(ClassFile2);
}
YY_BREAK
case 13:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 227 "tag.l"
{
addClass(className,yytext);
BEGIN(Pass1);
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 231 "tag.l"
{
yyLineNr++;
BEGIN(Pass1);
}
YY_BREAK
case 15:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 235 "tag.l"
{
cd=getClass(yytext);
BEGIN(BaseClasses);
}
YY_BREAK
case 16:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 239 "tag.l"
{
ClassDef *bcd=getClass(yytext);
if (cd && bcd)
{
cd->insertBaseClass(bcd,Public,Normal);
bcd->insertSuperClass(cd,Public,Normal);
}
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 247 "tag.l"
{
yyLineNr++;
BEGIN(Pass2);
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 251 "tag.l"
YY_BREAK
case 19:
YY_RULE_SETUP
#line 252 "tag.l"
{ yyLineNr++ ; }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 254 "tag.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Pass1):
case YY_STATE_EOF(Pass2):
case YY_STATE_EOF(AnchorName):
case YY_STATE_EOF(ArgString1):
case YY_STATE_EOF(ArgString2):
case YY_STATE_EOF(ClassName1):
case YY_STATE_EOF(ClassName2):
case YY_STATE_EOF(FileName):
case YY_STATE_EOF(NamespaceName):
case YY_STATE_EOF(BaseClasses):
case YY_STATE_EOF(ClassFile1):
case YY_STATE_EOF(ClassFile2):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_input_file = yyin;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 69 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 69 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 68);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( yyin );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
yy_current_buffer->yy_at_bol = (c == '\n');
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
{
int len;
for ( len = 0; yy_str[len]; ++len )
;
return yy_scan_bytes( yy_str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( ptr );
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
#line 254 "tag.l"
/*@ ----------------------------------------------------------------------------
*/
void parseTagFile(const char *fileName)
{
FILE *f=fopen(fileName,"r");
QFileInfo fi(fileName);
if (!f || !fi.exists())
{
if (f) fclose(f);
return;
}
tagName = fi.fileName();
tagYYin = f;
cd=0;
yyLineNr = 1;
tagYYrestart( tagYYin );
BEGIN(Pass1);
tagYYlex();
rewind(f);
cd=0;
yyLineNr = 1;
tagYYrestart( tagYYin );
BEGIN(Pass2);
tagYYlex();
fclose(f);
}
//extern "C" { // some bogus code to keep the compiler happy
// int tagYYwrap() { return 1 ; }
//}
...@@ -442,7 +442,7 @@ class TranslatorDutch : public Translator ...@@ -442,7 +442,7 @@ class TranslatorDutch : public Translator
QCString trSources() QCString trSources()
{ {
return "Sources"; return "Broncode";
} }
QCString trDefinedAtLineInSourceFile() QCString trDefinedAtLineInSourceFile()
{ {
...@@ -457,10 +457,81 @@ class TranslatorDutch : public Translator ...@@ -457,10 +457,81 @@ class TranslatorDutch : public Translator
// new since 1.0.0 // new since 1.0.0
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual QCString trDeprecated() QCString trDeprecated()
{ {
return "Verouderd"; return "Verouderd";
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.1.0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
QCString trCollaborationDiagram(const char *clName)
{
return (QCString)"Collaboratie diagram voor "+clName+":";
}
/*! this text is put before an include dependency graph */
QCString trInclDepGraph(const char *fName)
{
return (QCString)"Include afhankelijkheidsgraaf voor "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
QCString trConstructorDocumentation()
{
return "Constructor & Destructor Documentatie";
}
/*! Used in the file documentation to point to the corresponding sources. */
QCString trGotoSourceCode()
{
return "Ga naar de bron code van deze file.";
}
/*! Used in the file sources to point to the corresponding documentation. */
QCString trGotoDocumentation()
{
return "Ga naar de documentatie van deze file.";
}
/*! Text for the \pre command */
QCString trPrecondition()
{
return "Preconditie";
}
/*! Text for the \post command */
QCString trPostcondition()
{
return "Postconditie";
}
/*! Text for the \invariant command */
QCString trInvariant()
{
return "Invariant";
}
/*! Text shown before a multi-line variable/enum initialization */
QCString trInitialValue()
{
return "Initi&euml;le waarde:";
}
/*! Text used the source code in the file index */
QCString trCode()
{
return "code";
}
QCString trGraphicalHierarchy()
{
return "Grafische Klasse Hierarchie";
}
QCString trGotoGraphicalHierarchy()
{
return "Ga naar de grafische klasse hierarchie";
}
QCString trGotoTextualHierarchy()
{
return "Ga naar de tekstu&euml;le klasse hierarchie";
}
QCString trPageIndex()
{
return "Pagina Index";
}
}; };
#endif #endif
...@@ -1968,3 +1968,47 @@ int getPrefixIndex(const QCString &name) ...@@ -1968,3 +1968,47 @@ int getPrefixIndex(const QCString &name)
} }
return 0; return 0;
} }
//----------------------------------------------------------------------------
static void initBaseClassHierarchy(BaseClassList *bcl)
{
BaseClassListIterator bcli(*bcl);
for ( ; bcli.current(); ++bcli)
{
ClassDef *cd=bcli.current()->classDef;
if (cd->baseClasses()->count()==0) // no base classes => new root
{
initBaseClassHierarchy(cd->baseClasses());
}
cd->visited=FALSE;
}
}
//----------------------------------------------------------------------------
void initClassHierarchy(ClassList *cl)
{
ClassListIterator cli(*cl);
ClassDef *cd;
for ( ; (cd=cli.current()); ++cli)
{
cd->visited=FALSE;
initBaseClassHierarchy(cd->baseClasses());
}
}
//----------------------------------------------------------------------------
bool hasVisibleRoot(BaseClassList *bcl)
{
BaseClassListIterator bcli(*bcl);
for ( ; bcli.current(); ++bcli)
{
ClassDef *cd=bcli.current()->classDef;
if (cd->isVisibleInHierarchy()) return TRUE;
hasVisibleRoot(cd->baseClasses());
}
return FALSE;
}
...@@ -31,6 +31,8 @@ class ArgumentList; ...@@ -31,6 +31,8 @@ class ArgumentList;
class OutputList; class OutputList;
class MemberDef; class MemberDef;
class ExampleList; class ExampleList;
class ClassList;
class BaseClassList;
extern void setAnchors(char id,MemberList *ml); extern void setAnchors(char id,MemberList *ml);
extern QCString fileToString(const char *name); extern QCString fileToString(const char *name);
...@@ -80,5 +82,7 @@ void writePageRef(OutputList &ol,const char *cn,const char *mn); ...@@ -80,5 +82,7 @@ void writePageRef(OutputList &ol,const char *cn,const char *mn);
QCString substituteKeywords(const QCString &s,const char *title); QCString substituteKeywords(const QCString &s,const char *title);
int getPrefixIndex(const QCString &name); int getPrefixIndex(const QCString &name);
QCString removeAnnonymousScopes(const QCString &s); QCString removeAnnonymousScopes(const QCString &s);
void initClassHierarchy(ClassList *cl);
bool hasVisibleRoot(BaseClassList *bcl);
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment