Borderbasix

Classes | Macros | Typedefs | Functions | Variables
lex.mpoly.c File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "MPoly_lex.hpp"
#include <unistd.h>

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   mpoly_create_buffer
 
#define yy_delete_buffer   mpoly_delete_buffer
 
#define yy_flex_debug   mpoly_flex_debug
 
#define yy_init_buffer   mpoly_init_buffer
 
#define yy_flush_buffer   mpoly_flush_buffer
 
#define yy_load_buffer_state   mpoly_load_buffer_state
 
#define yy_switch_to_buffer   mpoly_switch_to_buffer
 
#define yyin   mpolyin
 
#define yyleng   mpolyleng
 
#define yylex   mpolylex
 
#define yylineno   mpolylineno
 
#define yyout   mpolyout
 
#define yyrestart   mpolyrestart
 
#define yytext   mpolytext
 
#define yywrap   mpolywrap
 
#define yyalloc   mpolyalloc
 
#define yyrealloc   mpolyrealloc
 
#define yyfree   mpolyfree
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   5
 
#define YY_FLEX_SUBMINOR_VERSION   35
 
#define FLEX_BETA
 
#define FLEXINT_H
 
#define INT8_MIN   (-128)
 
#define INT16_MIN   (-32767-1)
 
#define INT32_MIN   (-2147483647-1)
 
#define INT8_MAX   (127)
 
#define INT16_MAX   (32767)
 
#define INT32_MAX   (2147483647)
 
#define UINT8_MAX   (255U)
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define yyconst
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
 
#define BEGIN   (yy_start) = 1 + 2 *
 
#define YY_START   (((yy_start) - 1) / 2)
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_NEW_FILE   mpolyrestart(mpolyin )
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_BUF_SIZE   16384
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define YY_LESS_LINENO(n)
 
#define yyless(n)
 
#define unput(c)   yyunput( c, (yytext_ptr) )
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_CURRENT_BUFFER
 
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
 
#define YY_FLUSH_BUFFER   mpoly_flush_buffer(YY_CURRENT_BUFFER )
 
#define yy_new_buffer   mpoly_create_buffer
 
#define yy_set_interactive(is_interactive)
 
#define yy_set_bol(at_bol)
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define yytext_ptr   mpolytext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   7
 
#define YY_END_OF_BUFFER   8
 
#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_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( mpolytext, mpolyleng, 1, mpolyout )) {} } while (0)
 
#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_IS_OURS   1
 
#define YY_DECL   int mpolylex (void)
 
#define YY_USER_ACTION
 
#define YY_BREAK   break;
 
#define YY_RULE_SETUP   YY_USER_ACTION
 
#define YY_EXIT_FAILURE   2
 
#define yyless(n)
 
#define YYTABLES_NAME   "yytables"
 

Typedefs

typedef signed char flex_int8_t
 
typedef short int flex_int16_t
 
typedef int flex_int32_t
 
typedef unsigned char flex_uint8_t
 
typedef unsigned short int flex_uint16_t
 
typedef unsigned int flex_uint32_t
 
typedef struct yy_buffer_stateYY_BUFFER_STATE
 
typedef size_t yy_size_t
 
typedef unsigned char YY_CHAR
 
typedef int yy_state_type
 

Functions

void mpolyrestart (FILE *input_file)
 
void mpoly_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE mpoly_create_buffer (FILE *file, int size)
 
void mpoly_delete_buffer (YY_BUFFER_STATE b)
 
void mpoly_flush_buffer (YY_BUFFER_STATE b)
 
void mpolypush_buffer_state (YY_BUFFER_STATE new_buffer)
 
void mpolypop_buffer_state (void)
 
YY_BUFFER_STATE mpoly_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE mpoly_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE mpoly_scan_bytes (yyconst char *bytes, int len)
 
voidmpolyalloc (yy_size_t)
 
voidmpolyrealloc (void *, yy_size_t)
 
void mpolyfree (void *)
 
int mpolylex_destroy (void)
 
int mpolyget_debug (void)
 
void mpolyset_debug (int debug_flag)
 
YY_EXTRA_TYPE mpolyget_extra (void)
 
void mpolyset_extra (YY_EXTRA_TYPE user_defined)
 
FILE * mpolyget_in (void)
 
void mpolyset_in (FILE *in_str)
 
FILE * mpolyget_out (void)
 
void mpolyset_out (FILE *out_str)
 
int mpolyget_leng (void)
 
char * mpolyget_text (void)
 
int mpolyget_lineno (void)
 
void mpolyset_lineno (int line_number)
 
int mpolywrap (void)
 
int mpolylex (void)
 
 if (!(yy_init))
 
 while (1)
 
int isatty (int)
 
int my_yyinput (char *buf, int max_size)
 

Variables

int mpolyleng
 
FILE * mpolyin = (FILE *) 0
 
FILE * mpolyout = (FILE *) 0
 
int mpolylineno = 1
 
char * mpolytext
 
int mpoly_flex_debug = 0
 
 YY_DECL
 
register char * yy_cp
 
register char * yy_bp
 
register int yy_act
 

Macro Definition Documentation

#define BEGIN   (yy_start) = 1 + 2 *
#define ECHO   do { if (fwrite( mpolytext, mpolyleng, 1, mpolyout )) {} } while (0)
#define EOB_ACT_CONTINUE_SCAN   0
#define EOB_ACT_END_OF_FILE   1
#define EOB_ACT_LAST_MATCH   2
#define FLEX_BETA
#define FLEX_SCANNER
#define FLEXINT_H
#define INITIAL   0
#define INT16_MAX   (32767)
#define INT16_MIN   (-32767-1)
#define INT32_MAX   (2147483647)
#define INT32_MIN   (-2147483647-1)
#define INT8_MAX   (127)
#define INT8_MIN   (-128)
#define REJECT   reject_used_but_not_detected
#define UINT16_MAX   (65535U)
#define UINT32_MAX   (4294967295U)
#define UINT8_MAX   (255U)
#define unput (   c)    yyunput( c, (yytext_ptr) )
#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->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   mpoly_create_buffer
#define YY_CURRENT_BUFFER
Value:
( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
#define YY_DECL   int mpolylex (void)
#define YY_DECL_IS_OURS   1
#define yy_delete_buffer   mpoly_delete_buffer
#define YY_DO_BEFORE_ACTION
Value:
mpolyleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
register char * yy_cp
Definition: lex.mpoly.c:681
register char * yy_bp
Definition: lex.mpoly.c:681
int mpolyleng
Definition: lex.mpoly.c:302
#define yytext_ptr
Definition: lex.mpoly.c:373
#define YY_END_OF_BUFFER   8
#define YY_END_OF_BUFFER_CHAR   0
#define YY_EXIT_FAILURE   2
#define YY_EXTRA_TYPE   void *
#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )
int yy_flex_debug   mpoly_flex_debug
#define YY_FLEX_MAJOR_VERSION   2
#define YY_FLEX_MINOR_VERSION   5
#define YY_FLEX_SUBMINOR_VERSION   35
#define yy_flush_buffer   mpoly_flush_buffer
#define YY_FLUSH_BUFFER   mpoly_flush_buffer(YY_CURRENT_BUFFER )
#define yy_init_buffer   mpoly_init_buffer
#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
size_t n; \
for ( n = 0; n < max_size && \
(c = getc( mpolyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( mpolyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = fread(buf, 1, max_size, mpolyin))==0 && ferror(mpolyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(mpolyin); \
} \
}\
\
#define YY_FATAL_ERROR(msg)
Definition: lex.mpoly.c:645
size_t size_t MSKwchart MSKCONST char * input
Definition: mosek.h:4929
if(!(yy_init))
Definition: lex.mpoly.c:689
while(1)
Definition: lex.mpoly.c:715
FILE * mpolyin
Definition: lex.mpoly.c:364
MSKrealt * c
Definition: mosek.h:2678
#define YY_CURRENT_BUFFER_LVALUE
Definition: lex.mpoly.c:297
#define YY_INT_ALIGNED   short int
#define YY_LESS_LINENO (   n)
#define yy_load_buffer_state   mpoly_load_buffer_state
#define YY_MORE_ADJ   0
#define yy_new_buffer   mpoly_create_buffer
#define YY_NEW_FILE   mpolyrestart(mpolyin )
#define YY_NULL   0
#define YY_NUM_RULES   7
#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_set_bol (   at_bol)
Value:
{ \
mpolyensure_buffer_stack (); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_CURRENT_BUFFER
Definition: lex.mpoly.c:290
#define YY_BUF_SIZE
Definition: lex.mpoly.c:170
if(!(yy_init))
Definition: lex.mpoly.c:689
FILE * mpolyin
Definition: lex.mpoly.c:364
#define YY_CURRENT_BUFFER_LVALUE
Definition: lex.mpoly.c:297
YY_BUFFER_STATE mpoly_create_buffer(FILE *file, int size)
Definition: lex.mpoly.c:1322
#define yy_set_interactive (   is_interactive)
Value:
{ \
mpolyensure_buffer_stack (); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define YY_CURRENT_BUFFER
Definition: lex.mpoly.c:290
#define YY_BUF_SIZE
Definition: lex.mpoly.c:170
if(!(yy_init))
Definition: lex.mpoly.c:689
FILE * mpolyin
Definition: lex.mpoly.c:364
#define YY_CURRENT_BUFFER_LVALUE
Definition: lex.mpoly.c:297
YY_BUFFER_STATE mpoly_create_buffer(FILE *file, int size)
Definition: lex.mpoly.c:1322
#define YY_START   (((yy_start) - 1) / 2)
#define YY_START_STACK_INCR   25
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)
#define YY_STRUCT_YY_BUFFER_STATE
#define yy_switch_to_buffer   mpoly_switch_to_buffer
#define YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_SIZE_T
#define YY_USER_ACTION
#define yyalloc   mpolyalloc
#define yyconst
#define yyfree   mpolyfree
FILE * yyin   mpolyin
int yyleng   mpolyleng
#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up mpolytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up mpolytext again */ \
} \
while ( 0 )
#define YY_RESTORE_YY_MORE_OFFSET
Definition: lex.mpoly.c:485
#define YY_MORE_ADJ
Definition: lex.mpoly.c:484
#define YY_LESS_LINENO(n)
Definition: lex.mpoly.c:191
#define YY_DO_BEFORE_ACTION
Definition: lex.mpoly.c:383
register char * yy_cp
Definition: lex.mpoly.c:681
while(1)
Definition: lex.mpoly.c:715
register char * yy_bp
Definition: lex.mpoly.c:681
#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up mpolytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
mpolytext[mpolyleng] = (yy_hold_char); \
(yy_c_buf_p) = mpolytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
mpolyleng = yyless_macro_arg; \
} \
while ( 0 )
char * mpolytext
Definition: lex.mpoly.c:486
#define YY_LESS_LINENO(n)
Definition: lex.mpoly.c:191
while(1)
Definition: lex.mpoly.c:715
int mpolyleng
Definition: lex.mpoly.c:302
#define yylex   mpolylex
int yylineno   mpolylineno
#define yymore ( )    yymore_used_but_not_detected
FILE * yyout   mpolyout
#define yyrealloc   mpolyrealloc
#define yyrestart   mpolyrestart
#define YYSTATE   YY_START
#define YYTABLES_NAME   "yytables"
#define yyterminate ( )    return YY_NULL
char * yytext   mpolytext
#define yytext_ptr   mpolytext
#define yywrap   mpolywrap

Typedef Documentation

typedef short int flex_int16_t
typedef int flex_int32_t
typedef signed char flex_int8_t
typedef unsigned short int flex_uint16_t
typedef unsigned int flex_uint32_t
typedef unsigned char flex_uint8_t
typedef unsigned char YY_CHAR
typedef size_t yy_size_t
typedef int yy_state_type

Function Documentation

if ( yy_init)
int isatty ( int  )
YY_BUFFER_STATE mpoly_create_buffer ( FILE *  file,
int  size 
)

Allocate and initialize an input buffer state.

Parameters
fileA readable stream.
sizeThe character buffer size in bytes. When in doubt, use YY_BUF_SIZE.
Returns
the allocated buffer state.
void mpoly_delete_buffer ( YY_BUFFER_STATE  b)

Destroy the buffer.

Parameters
ba buffer created with mpoly_create_buffer()
void mpoly_flush_buffer ( YY_BUFFER_STATE  b)

Discard all buffered characters. On the next scan, YY_INPUT will be called.

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.
YY_BUFFER_STATE mpoly_scan_buffer ( char *  base,
yy_size_t  size 
)

Setup the input buffer state to scan directly from a user-specified character buffer.

Parameters
basethe character buffer
sizethe size in bytes of the character buffer
Returns
the newly allocated buffer state object.
YY_BUFFER_STATE mpoly_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len 
)

Setup the input buffer state to scan the given bytes. The next call to mpolylex() will scan from a copy of bytes.

Parameters
yybytesthe byte buffer to scan
_yybytes_lenthe number of bytes in the buffer pointed to by bytes.
Returns
the newly allocated buffer state object.
YY_BUFFER_STATE mpoly_scan_string ( yyconst char *  yystr)

Setup the input buffer state to scan a string. The next call to mpolylex() will scan from a copy of str.

Parameters
yystra NUL-terminated string to scan
Returns
the newly allocated buffer state object.
Note
If you want to scan bytes that may contain NUL values, then use mpoly_scan_bytes() instead.
void mpoly_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.
void * mpolyalloc ( yy_size_t  size)
void mpolyfree ( void ptr)
int mpolyget_debug ( void  )
YY_EXTRA_TYPE mpolyget_extra ( void  )
FILE * mpolyget_in ( void  )

Get the input stream.

int mpolyget_leng ( void  )

Get the length of the current token.

int mpolyget_lineno ( void  )

Get the current line number.

FILE * mpolyget_out ( void  )

Get the output stream.

char * mpolyget_text ( void  )

Get the current token.

int mpolylex ( void  )
int mpolylex_destroy ( void  )
void mpolypop_buffer_state ( void  )

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

void mpolypush_buffer_state ( YY_BUFFER_STATE  new_buffer)

Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.

Parameters
new_bufferThe new state.
void * mpolyrealloc ( void ptr,
yy_size_t  size 
)
void mpolyrestart ( FILE *  input_file)

Immediately switch to a different input stream.

Parameters
input_fileA readable stream.
Note
This function does not reset the start condition to INITIAL .
void mpolyset_debug ( int  debug_flag)
void mpolyset_extra ( YY_EXTRA_TYPE  user_defined)
void mpolyset_in ( FILE *  in_str)

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

Parameters
in_strA readable stream.
See also
mpoly_switch_to_buffer
void mpolyset_lineno ( int  line_number)

Set the current line number.

Parameters
line_number
void mpolyset_out ( FILE *  out_str)
int mpolywrap ( void  )
int my_yyinput ( char *  buf,
int  max_size 
)
while ( )

Variable Documentation

int mpoly_flex_debug = 0
FILE * mpolyin = (FILE *) 0
int mpolyleng
int mpolylineno = 1
FILE * mpolyout = (FILE *) 0
char * mpolytext
register int yy_act
register char * yy_bp
register char* yy_cp
YY_DECL
Initial value:
{
register yy_state_type yy_current_state
int yy_state_type
Definition: lex.mpoly.c:366

The main scanner function which does all the work.

Home  |  Download & InstallContributions