|
scanner.cc File Reference#include <stdio.h>
#include <errno.h>
#include "parser.h"
#include "scanner.hh"
#include "scope.hh"
#include <ylmm/lexmm.hh>
#include <unistd.h>
Include dependency graph for scanner.cc:
Go to the source code of this file.
Compounds |
struct | yy_buffer_state |
Defines |
#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 | yytext_ptr yytext |
#define | YY_DO_BEFORE_ACTION |
#define | YY_NUM_RULES 22 |
#define | YY_END_OF_BUFFER 23 |
#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 | LEX_test_scanner_ll |
#define | YLMM_SCANNER_CLASS toycalc::scanner |
#define | NOR 1 |
#define | CM0 2 |
#define | CM1 3 |
#define | CM2 4 |
#define | PPS 5 |
#define | PPL 6 |
#define | INC 7 |
#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) |
Typedefs |
typedef yy_buffer_state * | YY_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 [82] |
yyconst int | yy_ec [256] |
yyconst int | yy_meta [38] |
yyconst short int | yy_base [85] |
yyconst short int | yy_def [85] |
yyconst short int | yy_nxt [223] |
yyconst short int | yy_chk [223] |
yy_state_type | yy_last_accepting_state |
char * | yy_last_accepting_cpos |
register char * | yy_bp |
int | size |
FILE * | file |
int | len |
Define Documentation
#define EOB_ACT_CONTINUE_SCAN 0
|
|
#define EOB_ACT_END_OF_FILE 1
|
|
#define EOB_ACT_LAST_MATCH 2
|
|
#define LEX_test_scanner_ll
|
|
#define REJECT reject_used_but_not_detected
|
|
#define unput |
( |
c |
|
) |
yyunput( c, yytext_ptr )
|
|
#define YY_BUF_SIZE 16384
|
|
#define YY_BUFFER_EOF_PENDING 2
|
|
#define YY_BUFFER_NORMAL 1
|
|
#define YY_DECL int yylex YY_PROTO(( void ))
|
|
#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;
Definition at line 280 of file scanner.cc. |
#define YY_END_OF_BUFFER 23
|
|
#define YY_END_OF_BUFFER_CHAR 0
|
|
#define YY_EXIT_FAILURE 2
|
|
#define YY_FATAL_ERROR |
( |
msg |
|
) |
yy_fatal_error( msg )
|
|
#define YY_FLEX_MAJOR_VERSION 2
|
|
#define YY_FLEX_MINOR_VERSION 5
|
|
#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 \
{ \
errno=0; \
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(yyin); \
} \
}
Definition at line 569 of file scanner.cc. |
#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_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_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; \
}
Definition at line 257 of file scanner.cc. |
#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; \
}
Definition at line 250 of file scanner.cc. |
#define YY_START_STACK_INCR 25
|
|
#define YY_STATE_EOF |
( |
state |
|
) |
(YY_END_OF_BUFFER + state + 1)
|
|
|
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 )
Definition at line 126 of file scanner.cc. |
#define yymore |
( |
|
) |
yymore_used_but_not_detected
|
|
#define yyterminate |
( |
|
) |
return YY_NULL
|
|
Typedef Documentation
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] |
|
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] |
|
void yyrestart YY_PROTO |
( |
(FILE *input_file) |
|
) |
|
|
Variable Documentation
yyconst short int yy_accept[82] [static]
|
|
|
Initial value:
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 23, 21, 20, 6,
9, 10, 16, 14, 19, 15, 21, 17, 8, 7,
18, 13, 21, 6, 6, 6, 6, 6, 11, 12,
6, 0, 8, 8, 8, 0, 7, 0, 6, 6,
6, 6, 6, 0, 0, 0, 0, 8, 0, 6,
6, 6, 1, 6, 0, 0, 8, 6, 5, 6,
6, 2, 6, 6, 6, 3, 6, 6, 4, 6,
0
}
Definition at line 289 of file scanner.cc. |
yyconst short int yy_base[85] [static]
|
|
|
Initial value:
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 164, 185, 185, 143,
185, 185, 185, 185, 185, 185, 26, 185, 31, 34,
185, 185, 23, 31, 30, 33, 34, 32, 185, 185,
142, 36, 54, 62, 151, 76, 149, 0, 40, 49,
50, 57, 61, 0, 86, 89, 92, 95, 144, 53,
74, 90, 137, 92, 142, 101, 104, 117, 135, 102,
133, 113, 156, 107, 103, 106, 140, 105, 104, 77,
185, 181, 75, 54
}
Definition at line 342 of file scanner.cc. |
char* yy_c_buf_p = (char *) 0 [static]
|
|
yyconst short int yy_chk[223] [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, 1, 1,
1, 1, 1, 1, 1, 1, 1, 27, 27, 27,
29, 33, 29, 29, 29, 30, 30, 30, 29, 35,
34, 38, 36, 37, 42, 29, 84, 33, 34, 49,
49, 35, 36, 38, 37, 43, 43, 43, 50, 51,
42, 43, 60, 44, 44, 44, 52, 83, 43, 44,
53, 51, 46, 50, 46, 60, 44, 46, 46, 46,
52, 53, 55, 61, 55, 61, 80, 55, 55, 55,
56, 56, 56, 57, 57, 57, 58, 58, 58, 62,
62, 64, 66, 66, 66, 67, 67, 67, 64, 68,
74, 70, 75, 79, 78, 76, 74, 75, 68, 68,
68, 70, 72, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
68, 68, 71, 77, 69, 65, 63, 59, 47, 77,
45, 41, 20, 17, 0, 0, 71, 73, 73, 73,
0, 0, 73, 73, 0, 0, 73, 73, 73, 73,
73, 73, 82, 82, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81
}
Definition at line 397 of file scanner.cc. |
yyconst short int yy_def[85] [static]
|
|
|
Initial value:
{ 0,
81, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 81, 81, 81, 82,
81, 81, 81, 81, 81, 81, 81, 81, 81, 29,
81, 81, 81, 82, 82, 82, 82, 82, 81, 81,
82, 81, 81, 81, 29, 81, 30, 83, 82, 82,
82, 82, 82, 84, 81, 81, 81, 81, 81, 82,
82, 82, 82, 82, 81, 81, 81, 81, 82, 82,
82, 82, 68, 82, 82, 82, 82, 82, 82, 82,
0, 81, 81, 81
}
Definition at line 355 of file scanner.cc. |
int yy_did_buffer_switch_on_eof [static]
|
|
yyconst int yy_ec[256] [static]
|
|
char yy_hold_char [static]
|
|
char* yy_last_accepting_cpos [static]
|
|
yyconst int yy_meta[38] [static]
|
|
|
Initial value:
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 3, 3, 3, 1, 1, 3, 3, 2, 2,
3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 1
}
Definition at line 334 of file scanner.cc. |
yyconst short int yy_nxt[223] [static]
|
|
|
Initial value:
{ 0,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 30, 31, 32, 20, 20, 20, 33,
20, 20, 34, 35, 20, 36, 20, 20, 37, 38,
20, 20, 20, 20, 20, 39, 40, 43, 43, 43,
44, 48, 45, 45, 45, 47, 47, 47, 46, 42,
42, 42, 42, 42, 54, 46, 65, 48, 49, 42,
60, 50, 51, 53, 52, 43, 43, 43, 42, 42,
54, 55, 42, 43, 43, 43, 42, 59, 55, 55,
42, 62, 57, 61, 57, 69, 55, 58, 58, 58,
63, 64, 66, 42, 66, 70, 42, 67, 67, 67,
43, 43, 43, 58, 58, 58, 58, 58, 58, 42,
71, 42, 67, 67, 67, 67, 67, 67, 72, 41,
78, 42, 42, 42, 42, 42, 42, 79, 74, 74,
74, 75, 42, 74, 74, 41, 42, 74, 74, 74,
74, 74, 74, 41, 41, 41, 41, 41, 41, 41,
41, 41, 42, 80, 42, 73, 42, 68, 56, 42,
56, 42, 42, 81, 81, 81, 76, 77, 77, 77,
81, 81, 77, 77, 81, 81, 77, 77, 77, 77,
77, 77, 41, 41, 17, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81
}
Definition at line 368 of file scanner.cc. |
int yy_start = 0 [static]
|
|
FILE * yyout = (FILE *) 0
|
|
Top of page
Last update Wed Feb 5 03:34:10 2003
Christian Holm
Created by DoxyGen 1.2.15
|