LibreOffice Module hwpfilter (master) 1
Macros | Typedefs | Functions | Variables
lexer.cxx File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "nodes.h"
#include "grammar.h"
#include "lexer.hxx"
Include dependency graph for lexer.cxx:

Go to the source code of this file.

Macros

#define YY_STACK_USED   0
 
#define YY_ALWAYS_INTERACTIVE   0
 
#define YY_NEVER_INTERACTIVE   0
 
#define YY_MAIN   0
 
#define YY_USE_PROTOS
 
#define YY_USE_CONST
 
#define yyconst   const
 
#define YY_PROTO(proto)   proto
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   (static_cast<unsigned int>(static_cast<unsigned char>(c)))
 
#define YY_START   ((yy_start - 1) / 2)
 
#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 YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_CURRENT_BUFFER   yy_current_buffer
 
#define yytext_ptr   yytext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_END_OF_BUFFER   46
 
#define YY_MORE_ADJ   0
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define INITIAL   0
 
#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   do { fwrite( yytext, yyleng, 1, yyout ); } while (false)
 
#define YY_INPUT(buf, result, max_size)
 
#define yyterminate()   return YY_NULL
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
 
#define YY_DECL   int yylex YY_PROTO(( void ))
 
#define YY_USER_ACTION
 
#define YY_BREAK   break;
 
#define YY_RULE_SETUP    YY_USER_ACTION
 
#define YY_EXIT_FAILURE   2
 

Typedefs

typedef unsigned int yy_size_t
 
typedef unsigned char YY_CHAR
 
typedef int yy_state_type
 

Functions

static void yyrestart YY_PROTO ((FILE *input_file))
 
static void yy_switch_to_buffer YY_PROTO ((YY_BUFFER_STATE new_buffer))
 
static void yy_load_buffer_state YY_PROTO (())
 
static YY_BUFFER_STATE yy_create_buffer YY_PROTO ((FILE *file, int size))
 
static void yy_delete_buffer YY_PROTO ((YY_BUFFER_STATE b))
 
static void yy_init_buffer YY_PROTO ((YY_BUFFER_STATE b, FILE *file))
 
static YY_BUFFER_STATE yy_scan_buffer YY_PROTO ((char *base, yy_size_t size))
 
static YY_BUFFER_STATE yy_scan_string YY_PROTO ((yyconst char *yy_str))
 
static 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 *))
 
static yy_state_type yy_try_NUL_trans YY_PROTO ((yy_state_type current_state))
 
static void yy_fatal_error YY_PROTO ((yyconst char msg[]))
 
static int yywrap ()
 
static int token_debug (const char *format,...)
 
 if (yy_init)
 
 while (true)
 
static int yy_get_next_buffer ()
 
static yy_state_type yy_get_previous_state ()
 
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state)
 
void yyrestart (FILE *input_file)
 
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
void yy_load_buffer_state ()
 
YY_BUFFER_STATE yy_create_buffer (FILE *file, int size)
 
void yy_delete_buffer (YY_BUFFER_STATE b)
 
void yy_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
void yy_flush_buffer (YY_BUFFER_STATE b)
 
YY_BUFFER_STATE yy_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes, int len)
 
static void yy_fatal_error (yyconst char msg[])
 
static void * yy_flex_alloc (yy_size_t size)
 
static void * yy_flex_realloc (void *ptr, yy_size_t size)
 
static void yy_flex_free (void *ptr)
 
void initFlex (const char *_code)
 
void deinitFlex ()
 

Variables

static YY_BUFFER_STATE yy_current_buffer = nullptr
 
static char yy_hold_char
 
static int yy_n_chars
 
static int yyleng
 
static char * yy_c_buf_p = nullptr
 
static int yy_init = 1
 
static int yy_start = 0
 
static int yy_did_buffer_switch_on_eof
 
static FILE * yyin = nullptr
 
static FILE * yyout = nullptr
 
yyconst short int yy_accept [994]
 
yyconst int yy_ec [256]
 
yyconst int yy_meta [74]
 
yyconst short int yy_base [995]
 
yyconst short int yy_def [995]
 
yyconst short int yy_nxt [1389]
 
yyconst short int yy_chk [1389]
 
static yy_state_type yy_last_accepting_state
 
static char * yy_last_accepting_cpos
 
static char * yytext
 
 YY_DECL
 
char * yy_cp
 
char * yy_bp
 
int yy_act
 

Macro Definition Documentation

◆ ECHO

#define ECHO   do { fwrite( yytext, yyleng, 1, yyout ); } while (false)

Definition at line 1020 of file lexer.cxx.

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 98 of file lexer.cxx.

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

Definition at line 99 of file lexer.cxx.

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

Definition at line 100 of file lexer.cxx.

◆ INITIAL

#define INITIAL   0

Definition at line 940 of file lexer.cxx.

◆ YY_ALWAYS_INTERACTIVE

#define YY_ALWAYS_INTERACTIVE   0

Definition at line 28 of file lexer.cxx.

◆ YY_BREAK

#define YY_BREAK   break;

Definition at line 1074 of file lexer.cxx.

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

Definition at line 90 of file lexer.cxx.

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

Definition at line 166 of file lexer.cxx.

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

Definition at line 154 of file lexer.cxx.

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

Definition at line 155 of file lexer.cxx.

◆ YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER   yy_current_buffer

Definition at line 177 of file lexer.cxx.

◆ YY_DECL

#define YY_DECL   int yylex YY_PROTO(( void ))

Definition at line 1062 of file lexer.cxx.

◆ YY_DO_BEFORE_ACTION

#define YY_DO_BEFORE_ACTION
Value:
yyleng = static_cast<int>(yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
char * yy_cp
Definition: lexer.cxx:1083
#define yytext_ptr
Definition: lexer.cxx:218
char * yy_bp
Definition: lexer.cxx:1083

Definition at line 228 of file lexer.cxx.

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   46

Definition at line 235 of file lexer.cxx.

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 87 of file lexer.cxx.

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

Definition at line 2007 of file lexer.cxx.

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 1055 of file lexer.cxx.

◆ YY_INPUT

#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] = static_cast<char>(c); \
if ( c == '\n' ) \
buf[n++] = static_cast<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" );
sal_Int64 n
static YY_BUFFER_STATE yy_current_buffer
Definition: lexer.cxx:171
static FILE * yyin
Definition: lexer.cxx:216

Definition at line 1027 of file lexer.cxx.

◆ YY_MAIN

#define YY_MAIN   0

Definition at line 34 of file lexer.cxx.

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   0

Definition at line 937 of file lexer.cxx.

◆ YY_NEVER_INTERACTIVE

#define YY_NEVER_INTERACTIVE   0

Definition at line 31 of file lexer.cxx.

◆ YY_NEW_FILE

#define YY_NEW_FILE   yyrestart( yyin )

Definition at line 85 of file lexer.cxx.

◆ YY_NO_POP_STATE

#define YY_NO_POP_STATE   1

Definition at line 992 of file lexer.cxx.

◆ YY_NO_PUSH_STATE

#define YY_NO_PUSH_STATE   1

Definition at line 991 of file lexer.cxx.

◆ YY_NO_TOP_STATE

#define YY_NO_TOP_STATE   1

Definition at line 993 of file lexer.cxx.

◆ YY_NULL

#define YY_NULL   0

Definition at line 67 of file lexer.cxx.

◆ YY_PROTO

#define YY_PROTO (   proto)    proto

Definition at line 61 of file lexer.cxx.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 1011 of file lexer.cxx.

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 938 of file lexer.cxx.

◆ YY_RULE_SETUP

#define YY_RULE_SETUP    YY_USER_ACTION

Definition at line 1077 of file lexer.cxx.

◆ YY_SC_TO_UI

#define YY_SC_TO_UI (   c)    (static_cast<unsigned int>(static_cast<unsigned char>(c)))

Definition at line 74 of file lexer.cxx.

◆ YY_STACK_USED

#define YY_STACK_USED   0

Definition at line 25 of file lexer.cxx.

◆ YY_START

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

Definition at line 79 of file lexer.cxx.

◆ YY_STATE_EOF

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

Definition at line 82 of file lexer.cxx.

◆ YY_USE_CONST

#define YY_USE_CONST

Definition at line 51 of file lexer.cxx.

◆ YY_USE_PROTOS

#define YY_USE_PROTOS

Definition at line 48 of file lexer.cxx.

◆ YY_USER_ACTION

#define YY_USER_ACTION

Definition at line 1069 of file lexer.cxx.

◆ yyconst

#define yyconst   const

Definition at line 54 of file lexer.cxx.

◆ yyterminate

#define yyterminate ( )    return YY_NULL

Definition at line 1050 of file lexer.cxx.

◆ yytext_ptr

#define yytext_ptr   yytext

Definition at line 218 of file lexer.cxx.

Typedef Documentation

◆ YY_CHAR

typedef unsigned char YY_CHAR

Definition at line 215 of file lexer.cxx.

◆ yy_size_t

typedef unsigned int yy_size_t

Definition at line 108 of file lexer.cxx.

◆ yy_state_type

typedef int yy_state_type

Definition at line 217 of file lexer.cxx.

Function Documentation

◆ deinitFlex()

void deinitFlex ( )

Definition at line 2109 of file lexer.cxx.

References YY_CURRENT_BUFFER, yy_delete_buffer(), and yy_init.

Referenced by mainParse().

◆ if()

if ( yy_init  )

◆ initFlex()

void initFlex ( const char *  _code)

Definition at line 2104 of file lexer.cxx.

References yy_scan_string(), and yy_switch_to_buffer().

Referenced by mainParse().

◆ token_debug()

int token_debug ( const char *  format,
  ... 
)
static

Definition at line 2123 of file lexer.cxx.

Referenced by while().

◆ while()

while ( true  )

◆ yy_create_buffer()

YY_BUFFER_STATE yy_create_buffer ( FILE *  file,
int  size 
)

Definition at line 1747 of file lexer.cxx.

References FILE, size, YY_FATAL_ERROR, yy_flex_alloc(), and yy_init_buffer().

Referenced by if(), and yyrestart().

◆ yy_delete_buffer()

void yy_delete_buffer ( YY_BUFFER_STATE  b)

Definition at line 1778 of file lexer.cxx.

References yy_current_buffer, and yy_flex_free().

Referenced by deinitFlex(), and yywrap().

◆ yy_fatal_error()

static void yy_fatal_error ( yyconst char  msg[])
static

Definition at line 2011 of file lexer.cxx.

References YY_EXIT_FAILURE.

◆ yy_flex_alloc()

static void * yy_flex_alloc ( yy_size_t  size)
static

Definition at line 2058 of file lexer.cxx.

References size.

Referenced by yy_create_buffer(), yy_scan_buffer(), and yy_scan_bytes().

◆ yy_flex_free()

static void yy_flex_free ( void *  ptr)
static

Definition at line 2086 of file lexer.cxx.

Referenced by yy_delete_buffer().

◆ yy_flex_realloc()

static void * yy_flex_realloc ( void *  ptr,
yy_size_t  size 
)
static

Definition at line 2068 of file lexer.cxx.

References size.

Referenced by yy_get_next_buffer().

◆ yy_flush_buffer()

void yy_flush_buffer ( YY_BUFFER_STATE  b)

Definition at line 1831 of file lexer.cxx.

References YY_BUFFER_NEW, yy_current_buffer, YY_END_OF_BUFFER_CHAR, and yy_load_buffer_state().

Referenced by yy_init_buffer().

◆ yy_get_next_buffer()

static int yy_get_next_buffer ( )
static

◆ yy_get_previous_state()

static yy_state_type yy_get_previous_state ( )
static

◆ yy_init_buffer()

void yy_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)

Definition at line 1804 of file lexer.cxx.

References FILE, and yy_flush_buffer().

Referenced by yy_create_buffer(), and yyrestart().

◆ yy_load_buffer_state()

void yy_load_buffer_state ( )

◆ YY_PROTO() [1/14]

static int yy_get_next_buffer YY_PROTO ( ()  )
static

◆ YY_PROTO() [2/14]

static YY_BUFFER_STATE yy_scan_buffer YY_PROTO ( (char *base, yy_size_t size )
static

◆ YY_PROTO() [3/14]

static YY_BUFFER_STATE yy_create_buffer YY_PROTO ( (FILE *file, int size )
static

◆ YY_PROTO() [4/14]

static void yyrestart YY_PROTO ( (FILE *input_file)  )
static

◆ YY_PROTO() [5/14]

static void yy_flex_free YY_PROTO ( (void *)  )
static

◆ YY_PROTO() [6/14]

static void *yy_flex_realloc YY_PROTO ( (void *, yy_size_t )
static

◆ YY_PROTO() [7/14]

static void yy_flush_buffer YY_PROTO ( (YY_BUFFER_STATE b)  )
static

◆ YY_PROTO() [8/14]

static void yy_init_buffer YY_PROTO ( (YY_BUFFER_STATE b, FILE *file)  )
static

◆ YY_PROTO() [9/14]

static void yy_switch_to_buffer YY_PROTO ( (YY_BUFFER_STATE new_buffer)  )
static

◆ YY_PROTO() [10/14]

static void *yy_flex_alloc YY_PROTO ( (yy_size_t )
static

◆ YY_PROTO() [11/14]

static yy_state_type yy_try_NUL_trans YY_PROTO ( (yy_state_type current_state)  )
static

◆ YY_PROTO() [12/14]

static YY_BUFFER_STATE yy_scan_bytes YY_PROTO ( (yyconst char *bytes, int len)  )
static

◆ YY_PROTO() [13/14]

static YY_BUFFER_STATE yy_scan_string YY_PROTO ( (yyconst char *yy_str)  )
static

◆ YY_PROTO() [14/14]

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

◆ yy_scan_buffer()

YY_BUFFER_STATE yy_scan_buffer ( char *  base,
yy_size_t  size 
)

◆ yy_scan_bytes()

YY_BUFFER_STATE yy_scan_bytes ( yyconst char *  bytes,
int  len 
)

Definition at line 1917 of file lexer.cxx.

References i, n, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_flex_alloc(), and yy_scan_buffer().

Referenced by yy_scan_string().

◆ yy_scan_string()

YY_BUFFER_STATE yy_scan_string ( yyconst char *  yy_str)

Definition at line 1900 of file lexer.cxx.

References yy_scan_bytes().

Referenced by initFlex().

◆ yy_switch_to_buffer()

void yy_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

◆ yy_try_NUL_trans()

static yy_state_type yy_try_NUL_trans ( yy_state_type  yy_current_state)
static

Definition at line 1661 of file lexer.cxx.

References yy_accept, yy_base, yy_c_buf_p, yy_chk, yy_cp, yy_def, yy_last_accepting_cpos, yy_last_accepting_state, yy_meta, and yy_nxt.

Referenced by while().

◆ yyrestart()

void yyrestart ( FILE *  input_file)

◆ yywrap()

static int yywrap ( void  )
static

Definition at line 2116 of file lexer.cxx.

References YY_CURRENT_BUFFER, and yy_delete_buffer().

Referenced by while().

Variable Documentation

◆ yy_accept

yyconst short int yy_accept[994]

Definition at line 236 of file lexer.cxx.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_act

int yy_act

Definition at line 1084 of file lexer.cxx.

Referenced by while().

◆ yy_base

yyconst short int yy_base[995]

Definition at line 394 of file lexer.cxx.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_bp

char * yy_bp

Definition at line 1083 of file lexer.cxx.

Referenced by while().

◆ yy_c_buf_p

char* yy_c_buf_p = nullptr
static

◆ yy_chk

yyconst short int yy_chk[1389]

Definition at line 778 of file lexer.cxx.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_cp

char* yy_cp

Definition at line 1083 of file lexer.cxx.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_current_buffer

YY_BUFFER_STATE yy_current_buffer = nullptr
static

◆ YY_DECL

YY_DECL
Initial value:
{
yy_state_type yy_current_state
int yy_state_type
Definition: lexer.cxx:217

Definition at line 1080 of file lexer.cxx.

◆ yy_def

yyconst short int yy_def[995]

Definition at line 508 of file lexer.cxx.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_did_buffer_switch_on_eof

int yy_did_buffer_switch_on_eof
static

Definition at line 196 of file lexer.cxx.

Referenced by while(), and yy_switch_to_buffer().

◆ yy_ec

yyconst int yy_ec[256]

Definition at line 350 of file lexer.cxx.

Referenced by while(), and yy_get_previous_state().

◆ yy_hold_char

char yy_hold_char
static

Definition at line 181 of file lexer.cxx.

Referenced by while(), yy_load_buffer_state(), and yy_switch_to_buffer().

◆ yy_init

int yy_init = 1
static

Definition at line 190 of file lexer.cxx.

Referenced by deinitFlex(), and if().

◆ yy_last_accepting_cpos

char* yy_last_accepting_cpos
static

Definition at line 935 of file lexer.cxx.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_last_accepting_state

yy_state_type yy_last_accepting_state
static

Definition at line 934 of file lexer.cxx.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_meta

yyconst int yy_meta[74]
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, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1
}

Definition at line 382 of file lexer.cxx.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_n_chars

int yy_n_chars
static

Definition at line 183 of file lexer.cxx.

Referenced by while(), yy_get_next_buffer(), yy_load_buffer_state(), and yy_switch_to_buffer().

◆ yy_nxt

yyconst short int yy_nxt[1389]

Definition at line 622 of file lexer.cxx.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_start

int yy_start = 0
static

Definition at line 191 of file lexer.cxx.

Referenced by if(), while(), and yy_get_previous_state().

◆ yyin

FILE* yyin = nullptr
static

Definition at line 216 of file lexer.cxx.

Referenced by if(), while(), yy_get_next_buffer(), yy_load_buffer_state(), and yyrestart().

◆ yyleng

int yyleng
static

Definition at line 186 of file lexer.cxx.

◆ yyout

FILE * yyout = nullptr
static

Definition at line 216 of file lexer.cxx.

Referenced by if().

◆ yytext

char* yytext
static

Definition at line 939 of file lexer.cxx.

Referenced by while().