Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ReutersParser.cpp File Reference

#include <stdio.h>
#include "ReutersParser.hpp"
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <fstream>

Compounds

struct  yy_buffer_state

Defines

#define yy_create_buffer   reuters_create_buffer
#define yy_delete_buffer   reuters_delete_buffer
#define yy_scan_buffer   reuters_scan_buffer
#define yy_scan_string   reuters_scan_string
#define yy_scan_bytes   reuters_scan_bytes
#define yy_flex_debug   reuters_flex_debug
#define yy_init_buffer   reuters_init_buffer
#define yy_flush_buffer   reuters_flush_buffer
#define yy_load_buffer_state   reuters_load_buffer_state
#define yy_switch_to_buffer   reuters_switch_to_buffer
#define yyin   reutersin
#define yyleng   reutersleng
#define yylex   reuterslex
#define yyout   reutersout
#define yyrestart   reutersrestart
#define yytext   reuterstext
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION   2
#define YY_FLEX_MINOR_VERSION   5
#define yyconst
#define YY_PROTO(proto)   ()
#define YY_NULL   0
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
#define BEGIN   yy_start = 1 + 2 *
#define YY_START   ((yy_start - 1) / 2)
#define YYSTATE   YY_START
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
#define YY_NEW_FILE   yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR   0
#define YY_BUF_SIZE   16384
#define EOB_ACT_CONTINUE_SCAN   0
#define EOB_ACT_END_OF_FILE   1
#define EOB_ACT_LAST_MATCH   2
#define yyless(n)
#define unput(c)   yyunput( c, yytext_ptr )
#define YY_BUFFER_NEW   0
#define YY_BUFFER_NORMAL   1
#define YY_BUFFER_EOF_PENDING   2
#define YY_CURRENT_BUFFER   yy_current_buffer
#define YY_FLUSH_BUFFER   yy_flush_buffer( yy_current_buffer )
#define yy_new_buffer   yy_create_buffer
#define yy_set_interactive(is_interactive)
#define yy_set_bol(at_bol)
#define YY_AT_BOL()   (yy_current_buffer->yy_at_bol)
#define yywrap()   1
#define YY_SKIP_YYWRAP
#define yytext_ptr   yytext
#define YY_DO_BEFORE_ACTION
#define YY_NUM_RULES   20
#define YY_END_OF_BUFFER   21
#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
#define INITIAL   0
#define YY_NEVER_INTERACTIVE   1
#define B_DOC   1
#define E_DOC   2
#define B_DOCHDR   12
#define E_DOCHDR   13
#define F_DOCNO   3
#define WORD   11
#define UPWORD   18
#define CONTRACTION   14
#define ACRONYM   15
#define ACRONYM2   17
#define UNKNOWN   16
#define B_TEXT   19
#define E_TEXT   20
#define YY_NO_PUSH_STATE   1
#define YY_NO_POP_STATE   1
#define YY_NO_TOP_STATE   1
#define YY_READ_BUF_SIZE   8192
#define ECHO   (void) fwrite( yytext, yyleng, 1, yyout )
#define YY_INPUT(buf, result, max_size)
#define yyterminate()   return YY_NULL
#define YY_START_STACK_INCR   25
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
#define YY_DECL   int yylex YY_PROTO(( void ))
#define YY_BREAK   break;
#define YY_RULE_SETUP   YY_USER_ACTION
#define YY_EXIT_FAILURE   2
#define yyless(n)
#define OUTER   0
#define DOC   1
#define TEXT   9

Typedefs

typedef yy_buffer_stateYY_BUFFER_STATE
typedef unsigned int yy_size_t
typedef unsigned char YY_CHAR
typedef int yy_state_type

Functions

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))
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))
void *yy_flex_alloc YY_PROTO ((yy_size_t))
void *yy_flex_realloc YY_PROTO ((void *, yy_size_t))
void yy_flex_free YY_PROTO ((void *))
yy_state_type yy_try_NUL_trans YY_PROTO ((yy_state_type current_state))
void yy_fatal_error YY_PROTO ((yyconst char msg[]))
void yyunput YY_PROTO ((int c, char *buf_ptr))

Variables

int yyleng
FILE * yyin = (FILE *) 0
FILE * yyout = (FILE *) 0
YY_BUFFER_STATE yy_current_buffer = 0
char yy_hold_char
int yy_n_chars
char * yy_c_buf_p = (char *) 0
int yy_init = 1
int yy_start = 0
int yy_did_buffer_switch_on_eof
char * yytext
yyconst short int yy_accept [92]
yyconst int yy_ec [256]
yyconst int yy_meta [29]
yyconst short int yy_base [100]
yyconst short int yy_def [100]
yyconst short int yy_nxt [216]
yyconst short int yy_chk [216]
yy_state_type yy_last_accepting_state
char * yy_last_accepting_cpos
FILE * reutersin
char * reuterstext
long reuterspos
register char * yy_bp
int size
FILE * file
int len

Define Documentation

#define ACRONYM   15
 

#define ACRONYM2   17
 

#define B_DOC   1
 

#define B_DOCHDR   12
 

#define B_TEXT   19
 

#define BEGIN   yy_start = 1 + 2 *
 

#define CONTRACTION   14
 

#define DOC   1
 

#define E_DOC   2
 

#define E_DOCHDR   13
 

#define E_TEXT   20
 

#define ECHO   (void) fwrite( yytext, yyleng, 1, yyout )
 

#define EOB_ACT_CONTINUE_SCAN   0
 

#define EOB_ACT_END_OF_FILE   1
 

#define EOB_ACT_LAST_MATCH   2
 

#define F_DOCNO   3
 

#define FLEX_SCANNER
 

#define INITIAL   0
 

#define OUTER   0
 

#define REJECT   reject_used_but_not_detected
 

#define TEXT   9
 

#define UNKNOWN   16
 

#define unput c       yyunput( c, yytext_ptr )
 

#define UPWORD   18
 

#define WORD   11
 

 
#define YY_AT_BOL      (yy_current_buffer->yy_at_bol)
 

#define YY_BREAK   break;
 

#define YY_BUF_SIZE   16384
 

#define YY_BUFFER_EOF_PENDING   2
 

#define YY_BUFFER_NEW   0
 

#define YY_BUFFER_NORMAL   1
 

#define yy_create_buffer   reuters_create_buffer
 

#define YY_CURRENT_BUFFER   yy_current_buffer
 

#define YY_DECL   int yylex YY_PROTO(( void ))
 

#define yy_delete_buffer   reuters_delete_buffer
 

#define YY_DO_BEFORE_ACTION
 

Value:

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_END_OF_BUFFER   21
 

#define YY_END_OF_BUFFER_CHAR   0
 

#define YY_EXIT_FAILURE   2
 

#define YY_FATAL_ERROR msg       yy_fatal_error( msg )
 

#define yy_flex_debug   reuters_flex_debug
 

#define YY_FLEX_MAJOR_VERSION   2
 

#define YY_FLEX_MINOR_VERSION   5
 

#define YY_FLUSH_BUFFER   yy_flush_buffer( yy_current_buffer )
 

#define yy_flush_buffer   reuters_flush_buffer
 

#define yy_init_buffer   reuters_init_buffer
 

#define YY_INPUT buf,
result,
max_size   
 

Value:

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" );

#define yy_load_buffer_state   reuters_load_buffer_state
 

#define YY_MORE_ADJ   0
 

#define YY_NEVER_INTERACTIVE   1
 

#define yy_new_buffer   yy_create_buffer
 

#define YY_NEW_FILE   yyrestart( yyin )
 

#define YY_NO_POP_STATE   1
 

#define YY_NO_PUSH_STATE   1
 

#define YY_NO_TOP_STATE   1
 

#define YY_NULL   0
 

#define YY_NUM_RULES   20
 

#define YY_PROTO proto       ()
 

#define YY_READ_BUF_SIZE   8192
 

#define YY_RESTORE_YY_MORE_OFFSET
 

#define YY_RULE_SETUP   YY_USER_ACTION
 

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

#define yy_scan_buffer   reuters_scan_buffer
 

#define yy_scan_bytes   reuters_scan_bytes
 

#define yy_scan_string   reuters_scan_string
 

#define yy_set_bol at_bol   
 

Value:

{ \
        if ( ! yy_current_buffer ) \
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
        yy_current_buffer->yy_at_bol = at_bol; \
        }

#define yy_set_interactive is_interactive   
 

Value:

{ \
        if ( ! yy_current_buffer ) \
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
        yy_current_buffer->yy_is_interactive = is_interactive; \
        }

#define YY_SKIP_YYWRAP
 

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

#define YY_START_STACK_INCR   25
 

#define YY_STATE_EOF state       (YY_END_OF_BUFFER + state + 1)
 

#define yy_switch_to_buffer   reuters_switch_to_buffer
 

#define yyconst
 

#define yyin   reutersin
 

#define yyleng   reutersleng
 

#define yyless  
 

Value:

do \
                { \
                  \
                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 )

#define yyless  
 

Value:

do \
                { \
                  \
                *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;   \
                } \
        while ( 0 )

#define yylex   reuterslex
 

 
#define yymore      yymore_used_but_not_detected
 

#define yyout   reutersout
 

#define yyrestart   reutersrestart
 

#define YYSTATE   YY_START
 

 
#define yyterminate      return YY_NULL
 

#define yytext   reuterstext
 

#define yytext_ptr   yytext
 

 
#define yywrap      1
 


Typedef Documentation

typedef struct yy_buffer_state* YY_BUFFER_STATE
 

typedef unsigned char YY_CHAR
 

typedef unsigned int yy_size_t
 

typedef int yy_state_type
 


Function Documentation

void yyunput YY_PROTO (int c, char *buf_ptr)    [static]
 

void yy_fatal_error YY_PROTO (yyconst char msg[])    [static]
 

yy_state_type yy_try_NUL_trans YY_PROTO (yy_state_type current_state)    [static]
 

void yy_flex_free YY_PROTO (void *)    [static]
 

void* yy_flex_realloc YY_PROTO (void *, yy_size_t   [static]
 

void* yy_flex_alloc YY_PROTO (yy_size_t   [static]
 

YY_BUFFER_STATE yy_scan_bytes YY_PROTO (yyconst char *bytes, int len  
 

YY_BUFFER_STATE yy_scan_string YY_PROTO (yyconst char *yy_str)   
 

YY_BUFFER_STATE yy_scan_buffer YY_PROTO (char *base, yy_size_t size  
 

void yy_init_buffer YY_PROTO (YY_BUFFER_STATE b, FILE *file  
 

void yy_delete_buffer YY_PROTO (YY_BUFFER_STATE b  
 

YY_BUFFER_STATE yy_create_buffer YY_PROTO (FILE *file, int size  
 

void yy_load_buffer_state YY_PROTO (void)   
 

void yy_switch_to_buffer YY_PROTO (YY_BUFFER_STATE new_buffer)   
 

void yyrestart YY_PROTO (FILE *input_file)   
 


Variable Documentation

FILE* file
 

int len
 

FILE* reutersin
 

long reuterspos
 

char* reuterstext
 

yy_size_t size
 

yyconst short int yy_accept[92] [static]
 

Initial value:

    {   0,
        0,    0,   21,   19,   18,   19,   14,   19,   14,    0,
        0,    0,   14,    0,    0,    0,    0,    0,    0,    0,
       13,    0,   12,   11,   16,    0,    0,    0,    0,    0,
        9,    0,    0,    0,    0,    0,    0,   14,    0,   10,
        0,    0,    0,    0,    0,    0,    0,    0,   17,   15,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    3,    0,    0,    0,    4,    0,
        0,    0,    7,    0,    0,    8,    0,    0,    0,    0,
        0,    0,    0,    0,    5,    0,    6,    1,    0,    2,
        0

    }

yyconst short int yy_base[100] [static]
 

Initial value:

    {   0,
        0,    0,  186,  187,  187,  180,  177,   25,   23,   22,
       31,    0,  176,    0,   48,  168,   23,   25,   27,  166,
       40,   42,  187,  187,    0,  166,   42,   43,   45,  146,
      187,   53,   36,   56,   57,  145,  128,  145,  135,  187,
       59,   62,   63,   64,   67,   68,   66,   65,  131,    0,
       80,   72,   74,   81,   82,   85,  131,   88,   87,   91,
      128,   94,   96,   97,  187,  127,  100,  101,  187,  126,
      102,  105,  187,  104,  106,  187,  115,   17,  116,  108,
      125,  129,  124,  123,  187,  122,  187,  187,  119,  187,
      187,  141,  144,  149,   54,  155,  161,  167,  173

    }

register char* yy_bp
 

char* yy_c_buf_p = (char *) 0 [static]
 

yyconst short int yy_chk[216] [static]
 

Initial value:

    {   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,    8,    9,
       78,    9,   10,   10,    8,   11,   17,    9,   18,   78,
       19,   17,   11,   18,    8,   19,   21,   19,    8,   33,
        8,   15,   22,   22,   21,   27,   28,   15,   29,   95,
       27,   28,   33,   29,   21,   29,   32,   15,   32,   34,
       35,   15,   41,   15,   41,   42,   43,   44,   48,   47,
       45,   46,   35,   34,   45,   52,   48,   53,   42,   44,
       43,   47,   46,   51,   54,   55,   52,   51,   56,   53,

       59,   58,   54,   55,   60,   56,   58,   62,   59,   63,
       64,   60,   62,   67,   68,   71,   63,   74,   72,   75,
       67,   80,   64,   72,   75,   71,   68,   74,   77,   79,
       80,   82,   89,   77,   79,   86,   84,   83,   81,   70,
       66,   61,   82,   92,   57,   49,   92,   93,   39,   93,
       94,   38,   37,   36,   94,   96,   96,   96,   96,   30,
       96,   97,   97,   97,   97,   97,   97,   98,   98,   98,
       98,   98,   98,   99,   99,   99,   99,   99,   99,   26,
       20,   16,   13,    7,    6,    3,   91,   91,   91,   91,
       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,

       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
       91,   91,   91,   91,   91
    }

YY_BUFFER_STATE yy_current_buffer = 0 [static]
 

yyconst short int yy_def[100] [static]
 

Initial value:

    {   0,
       91,    1,   91,   91,   91,   92,   93,   94,   93,   91,
       92,   95,   93,   96,   94,   97,   97,   97,   97,   91,
       93,   91,   91,   91,   95,   98,   97,   97,   97,   97,
       91,   97,   97,   97,   97,   91,   95,   93,   98,   91,
       97,   97,   97,   97,   97,   97,   97,   97,   91,   95,
       97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
       97,   97,   97,   97,   91,   97,   97,   97,   91,   97,
       97,   97,   91,   97,   97,   91,   97,   97,   97,   97,
       97,   97,   97,   97,   91,   99,   91,   91,   99,   91,
        0,   91,   91,   91,   91,   91,   91,   91,   91

    }

int yy_did_buffer_switch_on_eof [static]
 

yyconst int yy_ec[256] [static]
 

char yy_hold_char [static]
 

int yy_init = 1 [static]
 

char* yy_last_accepting_cpos [static]
 

yy_state_type yy_last_accepting_state [static]
 

yyconst int yy_meta[29] [static]
 

Initial value:

    {   0,
        1,    1,    1,    2,    3,    1,    4,    5,    1,    2,
        4,    1,    1,    1,    6,    6,    6,    6,    6,    6,
        6,    6,    6,    6,    6,    6,    6,    6
    }

int yy_n_chars [static]
 

yyconst short int yy_nxt[216] [static]
 

Initial value:

    {   0,
        4,    5,    4,    4,    4,    6,    4,    4,    4,    4,
        7,    4,    8,    4,    9,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,   14,   12,
       31,   20,   22,   23,   15,   91,   31,   21,   31,   82,
       31,   32,   24,   33,   17,   34,   37,   35,   18,   31,
       19,   91,   22,   23,   21,   31,   31,   91,   31,   25,
       41,   42,   46,   43,   38,   44,   31,   27,   45,   31,
       31,   28,   31,   29,   51,   31,   31,   31,   31,   31,
       31,   31,   48,   47,   55,   31,   58,   31,   52,   54,
       53,   57,   56,   31,   31,   31,   60,   59,   31,   61,

       31,   31,   62,   63,   31,   64,   66,   31,   67,   31,
       31,   68,   70,   31,   31,   31,   71,   31,   31,   31,
       74,   31,   72,   78,   80,   77,   75,   79,   31,   31,
       84,   86,   90,   81,   83,   90,   88,   87,   85,   76,
       73,   69,   31,   11,   65,   36,   11,   13,   40,   13,
       16,   12,   50,   49,   16,   26,   26,   26,   26,   31,
       26,   30,   30,   30,   30,   30,   30,   39,   39,   39,
       39,   39,   39,   89,   89,   89,   89,   89,   89,   40,
       36,   31,   12,   12,   10,   91,    3,   91,   91,   91,
       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,

       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
       91,   91,   91,   91,   91
    }

int yy_start = 0 [static]
 

FILE* yyin = (FILE *) 0
 

int yyleng
 

FILE * yyout = (FILE *) 0
 

char* yytext
 


Generated on Wed Nov 3 12:59:18 2004 for Lemur Toolkit by doxygen1.2.18