#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "hecmw_heclex.h"
#include "hecmw_util.h"
#include <unistd.h>
Go to the source code of this file.
◆ BEGIN
| #define BEGIN (yy_start) = 1 + 2 * |
◆ ECHO
◆ EOB_ACT_CONTINUE_SCAN
| #define EOB_ACT_CONTINUE_SCAN 0 |
◆ EOB_ACT_END_OF_FILE
| #define EOB_ACT_END_OF_FILE 1 |
◆ EOB_ACT_LAST_MATCH
| #define EOB_ACT_LAST_MATCH 2 |
◆ FLEX_BETA
◆ FLEX_SCANNER
◆ FLEXINT_H
◆ HEADER
◆ INCLUDE
◆ INITIAL
◆ INT16_MAX
| #define INT16_MAX (32767) |
◆ INT16_MIN
| #define INT16_MIN (-32767 - 1) |
◆ INT32_MAX
| #define INT32_MAX (2147483647) |
◆ INT32_MIN
| #define INT32_MIN (-2147483647 - 1) |
◆ INT8_MAX
◆ INT8_MIN
◆ REJECT
| #define REJECT reject_used_but_not_detected |
◆ UINT16_MAX
| #define UINT16_MAX (65535U) |
◆ UINT32_MAX
| #define UINT32_MAX (4294967295U) |
◆ UINT8_MAX
◆ unput
◆ YY_AT_BOL
◆ YY_BREAK
◆ YY_BUF_SIZE
| #define YY_BUF_SIZE 16384 |
◆ YY_BUFFER_EOF_PENDING
| #define YY_BUFFER_EOF_PENDING 2 |
◆ YY_BUFFER_NEW
◆ YY_BUFFER_NORMAL
| #define YY_BUFFER_NORMAL 1 |
◆ yy_create_buffer
◆ YY_CURRENT_BUFFER
| #define YY_CURRENT_BUFFER ((yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : NULL) |
◆ YY_CURRENT_BUFFER_LVALUE
| #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
◆ YY_DECL
◆ YY_DECL_IS_OURS
| #define YY_DECL_IS_OURS 1 |
◆ yy_delete_buffer
◆ YY_DO_BEFORE_ACTION
| #define YY_DO_BEFORE_ACTION |
◆ YY_END_OF_BUFFER
| #define YY_END_OF_BUFFER 100 |
◆ YY_END_OF_BUFFER_CHAR
| #define YY_END_OF_BUFFER_CHAR 0 |
◆ YY_EXIT_FAILURE
| #define YY_EXIT_FAILURE 2 |
◆ YY_EXTRA_TYPE
| #define YY_EXTRA_TYPE void * |
◆ YY_FATAL_ERROR
| #define YY_FATAL_ERROR |
( |
|
msg | ) |
yy_fatal_error(msg) |
◆ yy_flex_debug
◆ YY_FLEX_MAJOR_VERSION
| #define YY_FLEX_MAJOR_VERSION 2 |
◆ YY_FLEX_MINOR_VERSION
| #define YY_FLEX_MINOR_VERSION 5 |
◆ YY_FLEX_SUBMINOR_VERSION
| #define YY_FLEX_SUBMINOR_VERSION 35 |
◆ yy_flush_buffer
◆ YY_FLUSH_BUFFER
◆ yy_init_buffer
| #define yy_init_buffer HECMW_hec_init_buffer |
◆ YY_INPUT
| #define YY_INPUT |
( |
|
buf, |
|
|
|
result, |
|
|
|
max_size |
|
) |
| |
Value:
int c = '*'; \
yy_size_t n; \
for (n = 0; n < max_size && (c = getc(
HECMW_hecin)) != EOF && c !=
'\n'; \
++n) \
buf[n] = (char)c; \
if (c == '\n') buf[n++] = (char)c; \
result = n; \
} else { \
errno = 0; \
while ((result = fread(buf, 1, max_size,
HECMW_hecin)) == 0 && \
if (errno != EINTR) { \
YY_FATAL_ERROR("input in flex scanner failed"); \
break; \
} \
errno = 0; \
} \
}
#define YY_CURRENT_BUFFER_LVALUE
#define YY_FATAL_ERROR(msg)
Definition at line 891 of file hecmw_heclex.c.
◆ YY_INT_ALIGNED
| #define YY_INT_ALIGNED short int |
◆ YY_LESS_LINENO
| #define YY_LESS_LINENO |
( |
|
n | ) |
|
◆ yy_load_buffer_state
| #define yy_load_buffer_state |
( |
|
void | ) |
HECMW_hec_load_buffer_state |
◆ YY_MORE_ADJ
◆ yy_new_buffer
◆ YY_NEW_FILE
◆ YY_NULL
◆ YY_NUM_RULES
◆ YY_READ_BUF_SIZE
| #define YY_READ_BUF_SIZE 8192 |
◆ YY_RESTORE_YY_MORE_OFFSET
| #define YY_RESTORE_YY_MORE_OFFSET |
◆ YY_RULE_SETUP
Value:
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
YY_USER_ACTION
Definition at line 961 of file hecmw_heclex.c.
◆ YY_SC_TO_UI
| #define YY_SC_TO_UI |
( |
|
c | ) |
((unsigned int)(unsigned char)c) |
◆ yy_set_bol
| #define yy_set_bol |
( |
|
at_bol | ) |
|
Value: { \
HECMW_hecensure_buffer_stack(); \
YY_CURRENT_BUFFER_LVALUE = \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_CURRENT_BUFFER
Definition at line 336 of file hecmw_heclex.c.
◆ yy_set_interactive
| #define yy_set_interactive |
( |
|
is_interactive | ) |
|
Value: { \
HECMW_hecensure_buffer_stack(); \
YY_CURRENT_BUFFER_LVALUE = \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
Definition at line 326 of file hecmw_heclex.c.
◆ YY_START
| #define YY_START (((yy_start)-1) / 2) |
◆ YY_START_STACK_INCR
| #define YY_START_STACK_INCR 25 |
◆ YY_STATE_BUF_SIZE
◆ YY_STATE_EOF
◆ YY_STRUCT_YY_BUFFER_STATE
| #define YY_STRUCT_YY_BUFFER_STATE |
◆ yy_switch_to_buffer
◆ YY_TYPEDEF_YY_BUFFER_STATE
| #define YY_TYPEDEF_YY_BUFFER_STATE |
◆ YY_TYPEDEF_YY_SIZE_T
| #define YY_TYPEDEF_YY_SIZE_T |
◆ YY_USER_ACTION
◆ yyalloc
◆ yyconst
◆ yyfree
◆ yyin
◆ yyleng
◆ yyless [1/2]
Value: do { \
\
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg); \
*
yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET(yy_c_buf_p) =
yy_cp = \
YY_DO_BEFORE_ACTION; \
} while (0)
Definition at line 2543 of file hecmw_heclex.c.
◆ yyless [2/2]
Value: do { \
\
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg); \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
HECMW_hecleng = yyless_macro_arg; \
} while (0)
Definition at line 2543 of file hecmw_heclex.c.
◆ yylex
◆ yylineno
◆ yymore
| #define yymore |
( |
| ) |
yymore_used_but_not_detected |
◆ yyout
◆ yyrealloc
◆ yyrestart
◆ YYSTATE
◆ YYTABLES_NAME
| #define YYTABLES_NAME "yytables" |
◆ yyterminate
| #define yyterminate |
( |
| ) |
return YY_NULL |
◆ yytext
◆ yytext_ptr
◆ yywrap
◆ flex_int16_t
◆ flex_int32_t
◆ flex_int8_t
◆ flex_uint16_t
◆ flex_uint32_t
◆ flex_uint8_t
◆ YY_BUFFER_STATE
◆ YY_CHAR
◆ yy_size_t
◆ yy_state_type
◆ HECMW_hec_create_buffer()
Allocate and initialize an input buffer state.
- Parameters
-
| file | A readable stream. |
| size | The character buffer size in bytes. When in doubt, use YY_BUF_SIZE. |
- Returns
- the allocated buffer state.
Definition at line 2271 of file hecmw_heclex.c.
◆ HECMW_hec_delete_buffer()
◆ HECMW_hec_flush_buffer()
Discard all buffered characters. On the next scan, YY_INPUT will be called.
- Parameters
-
| b | the buffer state to be flushed, usually YY_CURRENT_BUFFER. |
Definition at line 2344 of file hecmw_heclex.c.
◆ HECMW_hec_scan_buffer()
Setup the input buffer state to scan directly from a user-specified character buffer.
- Parameters
-
| base | the character buffer |
| size | the size in bytes of the character buffer |
- Returns
- the newly allocated buffer state object.
Definition at line 2458 of file hecmw_heclex.c.
◆ HECMW_hec_scan_bytes()
Setup the input buffer state to scan the given bytes. The next call to HECMW_heclex() will scan from a copy of bytes.
- Parameters
-
| bytes | the byte buffer to scan |
| len | the number of bytes in the buffer pointed to by bytes. |
- Returns
- the newly allocated buffer state object.
Definition at line 2505 of file hecmw_heclex.c.
◆ HECMW_hec_scan_string()
Setup the input buffer state to scan a string. The next call to HECMW_heclex() will scan from a copy of str.
- Parameters
-
| yystr | a 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 HECMW_hec_scan_bytes() instead.
Definition at line 2493 of file hecmw_heclex.c.
◆ HECMW_hec_switch_to_buffer()
Switch to a different input buffer.
- Parameters
-
| new_buffer | The new input buffer. |
Definition at line 2230 of file hecmw_heclex.c.
◆ HECMW_hecalloc()
◆ HECMW_hecfree()
| void HECMW_hecfree |
( |
void * |
ptr | ) |
|
◆ HECMW_hecget_debug()
| int HECMW_hecget_debug |
( |
void |
| ) |
|
◆ HECMW_hecget_extra()
◆ HECMW_hecget_in()
| FILE * HECMW_hecget_in |
( |
void |
| ) |
|
◆ HECMW_hecget_leng()
◆ HECMW_hecget_lineno()
| int HECMW_hecget_lineno |
( |
void |
| ) |
|
◆ HECMW_hecget_out()
| FILE * HECMW_hecget_out |
( |
void |
| ) |
|
◆ HECMW_hecget_text()
| char * HECMW_hecget_text |
( |
void |
| ) |
|
◆ HECMW_heclex()
| int HECMW_heclex |
( |
void |
| ) |
|
◆ HECMW_heclex_destroy()
| int HECMW_heclex_destroy |
( |
void |
| ) |
|
◆ HECMW_heclex_get_lineno()
| int HECMW_heclex_get_lineno |
( |
void |
| ) |
|
◆ HECMW_heclex_get_number()
| double HECMW_heclex_get_number |
( |
void |
| ) |
|
◆ HECMW_heclex_get_text()
| char* HECMW_heclex_get_text |
( |
void |
| ) |
|
◆ HECMW_heclex_is_including()
| int HECMW_heclex_is_including |
( |
void |
| ) |
|
◆ HECMW_heclex_next_token()
| int HECMW_heclex_next_token |
( |
void |
| ) |
|
◆ HECMW_heclex_next_token_skip()
| int HECMW_heclex_next_token_skip |
( |
int |
skip_token | ) |
|
◆ HECMW_heclex_set_input()
| int HECMW_heclex_set_input |
( |
FILE * |
fp | ) |
|
◆ HECMW_heclex_skip_line()
| int HECMW_heclex_skip_line |
( |
void |
| ) |
|
◆ HECMW_heclex_switch_to_include()
| int HECMW_heclex_switch_to_include |
( |
const char * |
filename | ) |
|
◆ HECMW_heclex_unput_token()
| int HECMW_heclex_unput_token |
( |
void |
| ) |
|
◆ HECMW_hecpop_buffer_state()
| void HECMW_hecpop_buffer_state |
( |
void |
| ) |
|
Removes and deletes the top of the stack, if present. The next element becomes the new top.
Definition at line 2396 of file hecmw_heclex.c.
◆ HECMW_hecpush_buffer_state()
Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.
- Parameters
-
Definition at line 2370 of file hecmw_heclex.c.
◆ HECMW_hecrealloc()
| void * HECMW_hecrealloc |
( |
void * |
ptr, |
|
|
yy_size_t |
size |
|
) |
| |
◆ HECMW_hecrestart()
| void HECMW_hecrestart |
( |
FILE * |
input_file | ) |
|
Immediately switch to a different input stream.
- Parameters
-
| input_file | A readable stream. |
- Note
- This function does not reset the start condition to
INITIAL .
Definition at line 2215 of file hecmw_heclex.c.
◆ HECMW_hecset_debug()
| void HECMW_hecset_debug |
( |
int |
debug_flag | ) |
|
◆ HECMW_hecset_extra()
◆ HECMW_hecset_in()
| void HECMW_hecset_in |
( |
FILE * |
in_str | ) |
|
◆ HECMW_hecset_lineno()
| void HECMW_hecset_lineno |
( |
int |
line_number | ) |
|
◆ HECMW_hecset_out()
| void HECMW_hecset_out |
( |
FILE * |
out_str | ) |
|
◆ HECMW_hecwrap()
| int HECMW_hecwrap |
( |
void |
| ) |
|
◆ if()
◆ isatty()
◆ while()
◆ HECMW_hec_flex_debug
| int HECMW_hec_flex_debug = 0 |
◆ HECMW_hecin
| FILE * HECMW_hecin = (FILE *)0 |
◆ HECMW_hecleng
◆ HECMW_heclineno
◆ HECMW_hecout
| FILE * HECMW_hecout = (FILE *)0 |
◆ HECMW_hectext
◆ yy_act
◆ yy_bp
◆ yy_cp
◆ YY_DECL
Initial value:The main scanner function which does all the work.
Definition at line 969 of file hecmw_heclex.c.