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

ChineseParser.cpp File Reference

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

Compounds

struct  yy_buffer_state

Defines

#define yy_create_buffer   Chinese_create_buffer
#define yy_delete_buffer   Chinese_delete_buffer
#define yy_scan_buffer   Chinese_scan_buffer
#define yy_scan_string   Chinese_scan_string
#define yy_scan_bytes   Chinese_scan_bytes
#define yy_flex_debug   Chinese_flex_debug
#define yy_init_buffer   Chinese_init_buffer
#define yy_flush_buffer   Chinese_flush_buffer
#define yy_load_buffer_state   Chinese_load_buffer_state
#define yy_switch_to_buffer   Chinese_switch_to_buffer
#define yyin   Chinesein
#define yyleng   Chineseleng
#define yylex   Chineselex
#define yyout   Chineseout
#define yyrestart   Chineserestart
#define yytext   Chinesetext
#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   29
#define YY_END_OF_BUFFER   30
#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 SKIP   1
#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 [126]
yyconst int yy_ec [256]
yyconst int yy_meta [54]
yyconst short int yy_base [135]
yyconst short int yy_def [135]
yyconst short int yy_nxt [536]
yyconst short int yy_chk [536]
yy_state_type yy_last_accepting_state
char * yy_last_accepting_cpos
FILE * Chinesein
char * Chinesetext
long chinesepos
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 SKIP   1
 

#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   Chinese_create_buffer
 

#define YY_CURRENT_BUFFER   yy_current_buffer
 

#define YY_DECL   int yylex YY_PROTO(( void ))
 

#define yy_delete_buffer   Chinese_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   30
 

#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   Chinese_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   Chinese_flush_buffer
 

#define yy_init_buffer   Chinese_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   Chinese_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   29
 

#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   Chinese_scan_buffer
 

#define yy_scan_bytes   Chinese_scan_bytes
 

#define yy_scan_string   Chinese_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   Chinese_switch_to_buffer
 

#define yyconst
 

#define yyin   Chinesein
 

#define yyleng   Chineseleng
 

#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   Chineselex
 

 
#define yymore      yymore_used_but_not_detected
 

#define yyout   Chineseout
 

#define yyrestart   Chineserestart
 

#define YYSTATE   YY_START
 

 
#define yyterminate      return YY_NULL
 

#define yytext   Chinesetext
 

#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* Chinesein
 

long chinesepos
 

char* Chinesetext
 

FILE* file
 

int len
 

yy_size_t size
 

yyconst short int yy_accept[126] [static]
 

Initial value:

    {   0,
        0,    0,    0,    0,   30,   26,   28,   27,   26,   22,
       26,   22,   26,   26,   26,   26,   26,   26,   26,   22,
       26,   26,   26,   26,   26,   26,   26,   26,   21,   20,
       20,   20,   20,   26,   19,   18,   24,   26,    0,   26,
       26,   26,   26,   26,    0,   16,   26,   26,   26,   26,
       26,   26,   26,   26,   22,   20,   26,    0,   17,   17,
       26,   26,   26,   26,   26,   26,   16,   26,   26,    6,
       14,   26,   26,   25,   23,   26,   26,    7,   15,   26,
       26,    1,   26,   26,   26,   12,    2,   26,   26,   13,
       26,    8,   26,    4,    9,   26,    5,   16,   26,   26,

       26,    0,   26,   26,   26,    0,   26,   26,   26,    0,
       26,   10,   11,    0,   26,    0,   26,    0,   26,    0,
       26,    0,    3,    3,    0
    }

yyconst short int yy_base[135] [static]
 

Initial value:

    {   0,
        0,    0,    0,    0,  218,    0,  482,  482,   49,   72,
       98,  119,  139,  163,  208,    0,   44,   98,  247,    0,
       55,  203,  146,  203,  230,  234,  275,  287,   52,    0,
        0,    0,    0,   73,    0,    0,    0,  148,  151,  313,
      277,  315,  317,  150,  149,    0,  217,  152,  154,  279,
      319,  336,  152,  130,    0,    0,  281,  144,    0,  482,
      283,  339,  321,  342,  345,  349,  482,  359,  362,    0,
        0,  364,  367,    0,    0,  372,  381,    0,    0,  386,
      389,    0,  391,  394,  399,    0,    0,  404,  407,    0,
      417,    0,  420,    0,    0,  422,    0,  285,  425,  430,

      427,  120,  122,  435,  443,  121,  112,  449,  453,  111,
       88,    0,    0,   87,   92,   90,   83,   82,   80,   62,
       68,   66,    0,  482,  482,   61,  467,  469,   59,  471,
      473,  475,  477,  479
    }

register char* yy_bp
 

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

yyconst short int yy_chk[536] [static]
 

YY_BUFFER_STATE yy_current_buffer = 0 [static]
 

yyconst short int yy_def[135] [static]
 

Initial value:

    {   0,
      125,    1,    1,    1,  125,  126,  125,  125,  126,  126,
      126,   10,  126,  126,   13,  126,  126,    9,  126,   10,
      127,   11,  128,  128,  128,  128,  128,  126,   12,  129,
      129,  129,  129,  126,  126,  126,   19,  130,  131,  128,
      128,  128,  128,  128,  132,  126,  128,  128,  128,  128,
      128,  128,  126,   19,   10,  129,  130,  131,  126,  125,
      128,  128,  128,  128,  128,  128,  125,  128,  128,  126,
      126,  128,  128,   28,   19,  128,  128,  126,  126,  128,
      128,  126,  128,  128,  128,  126,  126,  128,  128,  126,
      128,  126,  128,  126,  126,  128,  126,  133,  128,  128,

      133,  134,  126,  128,  128,  125,  126,  128,  128,  125,
      126,  126,  126,  125,  126,  125,  126,  125,  126,  125,
      126,  125,  126,  125,    0,  125,  125,  125,  125,  125,
      125,  125,  125,  125
    }

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[54] [static]
 

Initial value:

    {   0,
        1,    2,    2,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1
    }

int yy_n_chars [static]
 

yyconst short int yy_nxt[536] [static]
 

int yy_start = 0 [static]
 

FILE* yyin = (FILE *) 0
 

int yyleng
 

FILE * yyout = (FILE *) 0
 

char* yytext
 


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