torc-master
|
Source for the XdlScanner class. More...
#include <iostream>
#include <errno.h>
#include <cstdlib>
#include <cstring>
#include <FlexLexer.h>
#include <string>
#include "torc/physical/xdl/XdlScanner.hpp"
Go to the source code of this file.
Data Structures | |
struct | yy_buffer_state |
Bison parser internals. More... | |
struct | yy_trans_info |
Bison parser internals. More... | |
Namespaces | |
torc | |
Implementation of class to encapsulate micro-bitstream library generation code. | |
torc::physical | |
Namespace for the Torc physical netlist, including the XDL importer, exporter, placer, router, unpacker, and packer. | |
Macros | |
#define | YY_INT_ALIGNED short int |
#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 | yyFlexLexer XdlFlexLexer |
#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 yyrestart( yyin ) |
#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_new_buffer yy_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 yytext |
#define | YY_DO_BEFORE_ACTION |
#define | YY_NUM_RULES 45 |
#define | YY_END_OF_BUFFER 46 |
#define | REJECT |
#define | yymore() yymore_used_but_not_detected |
#define | YY_MORE_ADJ 0 |
#define | YY_RESTORE_YY_MORE_OFFSET |
#define | yyterminate() return token::END |
#define | YY_NO_UNISTD_H |
Disable the inclusion of unistd.h, which is not available under Visual C++ on Win32. More... | |
#define | DEBUG(a) |
#define | DEBUG1(a) printf a |
#define | YY_USER_ACTION yylloc->columns(yyleng); |
Enable C++ generation for the scanner class. More... | |
#define | INITIAL 0 |
Special lexing state for config strings. More... | |
#define | CONFIGSTRING 1 |
Bison lexer internals. More... | |
#define | CONFIGSTRING2 2 |
Bison lexer internals. More... | |
#define | DOUBLEQUOTE 3 |
Bison lexer internals. More... | |
#define | YY_EXTRA_TYPE void * |
#define | YY_READ_BUF_SIZE 8192 |
#define | ECHO LexerOutput( yytext, yyleng ) |
#define | YY_INPUT(buf, result, max_size) |
#define | YY_START_STACK_INCR 25 |
#define | YY_FATAL_ERROR(msg) LexerError( msg ) |
#define | YY_DECL_IS_OURS 1 |
#define | YY_DECL int yyFlexLexer::yylex() |
#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_state * | YY_BUFFER_STATE |
typedef size_t | yy_size_t |
typedef unsigned char | YY_CHAR |
typedef torc::XdlParser::token | token |
Import the parser's token types into a local typedef. More... | |
typedef torc::XdlParser::token_type | token_type |
Functions | |
void * | Xdlalloc (yy_size_t) |
Bison lexer internals. More... | |
void * | Xdlrealloc (void *, yy_size_t) |
Bison lexer internals. More... | |
void | Xdlfree (void *) |
Bison lexer internals. More... | |
yylloc | step () |
Code belonging at the beginning of yylex(). More... | |
if (!(yy_init)) | |
while (1) | |
int | isatty (int) |
Variables | |
int | yyleng |
static yyconst flex_int16_t | yy_acclist [232] |
static yyconst flex_int16_t | yy_accept [170] |
static yyconst flex_int32_t | yy_ec [256] |
static yyconst flex_int32_t | yy_meta [44] |
static yyconst flex_int16_t | yy_base [179] |
static yyconst flex_int16_t | yy_def [179] |
static yyconst flex_int16_t | yy_nxt [322] |
static yyconst flex_int16_t | yy_chk [322] |
YY_DECL register yy_state_type | yy_current_state |
register char * | yy_cp |
register char * | yy_bp |
register int | yy_act |
Source for the XdlScanner class.
Definition in file XdlScanner.cpp.
#define BEGIN (yy_start) = 1 + 2 * |
Definition at line 136 of file XdlScanner.cpp.
#define CONFIGSTRING 1 |
Bison lexer internals.
Definition at line 637 of file XdlScanner.cpp.
#define CONFIGSTRING2 2 |
Bison lexer internals.
Definition at line 638 of file XdlScanner.cpp.
#define DEBUG | ( | a | ) |
Definition at line 611 of file XdlScanner.cpp.
#define DEBUG1 | ( | a | ) | printf a |
Definition at line 612 of file XdlScanner.cpp.
#define DOUBLEQUOTE 3 |
Bison lexer internals.
Definition at line 639 of file XdlScanner.cpp.
#define ECHO LexerOutput( yytext, yyleng ) |
Definition at line 672 of file XdlScanner.cpp.
#define EOB_ACT_CONTINUE_SCAN 0 |
Definition at line 169 of file XdlScanner.cpp.
#define EOB_ACT_END_OF_FILE 1 |
Definition at line 170 of file XdlScanner.cpp.
#define EOB_ACT_LAST_MATCH 2 |
Definition at line 171 of file XdlScanner.cpp.
#define FLEX_BETA |
Definition at line 14 of file XdlScanner.cpp.
#define FLEX_SCANNER |
Definition at line 9 of file XdlScanner.cpp.
#define FLEXINT_H |
Definition at line 34 of file XdlScanner.cpp.
#define INITIAL 0 |
Special lexing state for config strings.
Special second lexing state for config strings. Special lexing state for double-quoted strings.
Definition at line 636 of file XdlScanner.cpp.
#define INT16_MAX (32767) |
Definition at line 77 of file XdlScanner.cpp.
#define INT16_MIN (-32767-1) |
Definition at line 68 of file XdlScanner.cpp.
#define INT32_MAX (2147483647) |
Definition at line 80 of file XdlScanner.cpp.
#define INT32_MIN (-2147483647-1) |
Definition at line 71 of file XdlScanner.cpp.
#define INT8_MAX (127) |
Definition at line 74 of file XdlScanner.cpp.
#define INT8_MIN (-128) |
Definition at line 65 of file XdlScanner.cpp.
#define REJECT |
Definition at line 551 of file XdlScanner.cpp.
#define UINT16_MAX (65535U) |
Definition at line 86 of file XdlScanner.cpp.
#define UINT32_MAX (4294967295U) |
Definition at line 89 of file XdlScanner.cpp.
#define UINT8_MAX (255U) |
Definition at line 83 of file XdlScanner.cpp.
#define unput | ( | c | ) | yyunput( c, (yytext_ptr) ) |
Definition at line 189 of file XdlScanner.cpp.
#define YY_AT_BOL | ( | ) | (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
Definition at line 303 of file XdlScanner.cpp.
#define YY_BREAK break; |
Definition at line 723 of file XdlScanner.cpp.
#define YY_BUF_SIZE 16384 |
Definition at line 155 of file XdlScanner.cpp.
#define YY_BUFFER_EOF_PENDING 2 |
Definition at line 257 of file XdlScanner.cpp.
#define YY_BUFFER_NEW 0 |
Definition at line 245 of file XdlScanner.cpp.
#define YY_BUFFER_NORMAL 1 |
Definition at line 246 of file XdlScanner.cpp.
#define YY_CURRENT_BUFFER |
Definition at line 268 of file XdlScanner.cpp.
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
Definition at line 275 of file XdlScanner.cpp.
#define YY_DECL int yyFlexLexer::yylex() |
Definition at line 711 of file XdlScanner.cpp.
#define YY_DECL_IS_OURS 1 |
Definition at line 710 of file XdlScanner.cpp.
#define YY_DO_BEFORE_ACTION |
Definition at line 316 of file XdlScanner.cpp.
#define YY_END_OF_BUFFER 46 |
Definition at line 324 of file XdlScanner.cpp.
#define YY_END_OF_BUFFER_CHAR 0 |
Definition at line 151 of file XdlScanner.cpp.
#define YY_EXIT_FAILURE 2 |
Definition at line 1935 of file XdlScanner.cpp.
#define YY_EXTRA_TYPE void * |
Definition at line 650 of file XdlScanner.cpp.
#define YY_FATAL_ERROR | ( | msg | ) | LexerError( msg ) |
Definition at line 701 of file XdlScanner.cpp.
#define YY_FLEX_MAJOR_VERSION 2 |
Definition at line 10 of file XdlScanner.cpp.
#define YY_FLEX_MINOR_VERSION 5 |
Definition at line 11 of file XdlScanner.cpp.
#define YY_FLEX_SUBMINOR_VERSION 35 |
Definition at line 12 of file XdlScanner.cpp.
#define YY_INPUT | ( | buf, | |
result, | |||
max_size | |||
) |
Definition at line 679 of file XdlScanner.cpp.
#define YY_INT_ALIGNED short int |
Definition at line 5 of file XdlScanner.cpp.
#define YY_LESS_LINENO | ( | n | ) |
Definition at line 173 of file XdlScanner.cpp.
#define YY_MORE_ADJ 0 |
Definition at line 560 of file XdlScanner.cpp.
#define yy_new_buffer yy_create_buffer |
Definition at line 281 of file XdlScanner.cpp.
#define YY_NEW_FILE yyrestart( yyin ) |
Definition at line 149 of file XdlScanner.cpp.
#define YY_NO_UNISTD_H |
Disable the inclusion of unistd.h, which is not available under Visual C++ on Win32.
The C++ scanner uses STL streams instead.
Definition at line 608 of file XdlScanner.cpp.
#define YY_NULL 0 |
Definition at line 123 of file XdlScanner.cpp.
#define YY_NUM_RULES 45 |
Definition at line 323 of file XdlScanner.cpp.
#define YY_READ_BUF_SIZE 8192 |
Definition at line 667 of file XdlScanner.cpp.
#define YY_RESTORE_YY_MORE_OFFSET |
Definition at line 561 of file XdlScanner.cpp.
#define YY_RULE_SETUP YY_USER_ACTION |
Definition at line 726 of file XdlScanner.cpp.
#define YY_SC_TO_UI | ( | c | ) | ((unsigned int) (unsigned char) c) |
Definition at line 130 of file XdlScanner.cpp.
#define yy_set_bol | ( | at_bol | ) |
Definition at line 293 of file XdlScanner.cpp.
#define yy_set_interactive | ( | is_interactive | ) |
Definition at line 283 of file XdlScanner.cpp.
#define YY_START (((yy_start) - 1) / 2) |
Definition at line 142 of file XdlScanner.cpp.
#define YY_START_STACK_INCR 25 |
Definition at line 696 of file XdlScanner.cpp.
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
Definition at line 160 of file XdlScanner.cpp.
#define YY_STATE_EOF | ( | state | ) | (YY_END_OF_BUFFER + state + 1) |
Definition at line 146 of file XdlScanner.cpp.
#define YY_STRUCT_YY_BUFFER_STATE |
Definition at line 197 of file XdlScanner.cpp.
#define YY_TYPEDEF_YY_BUFFER_STATE |
Definition at line 163 of file XdlScanner.cpp.
#define YY_TYPEDEF_YY_SIZE_T |
Definition at line 192 of file XdlScanner.cpp.
#define YY_USER_ACTION yylloc->columns(yyleng); |
Enable C++ generation for the scanner class.
Change the name of the scanner class to "XdlFlexLexer". The manual says batch is "somewhat more optimized". Enable debug output from the scanner. We anticipate no included XDL files. Enable the use of start condition stacks. Track location information. Each time yylex is invoked, begin is moved to end.
Definition at line 627 of file XdlScanner.cpp.
#define yyconst |
Definition at line 119 of file XdlScanner.cpp.
#define yyFlexLexer XdlFlexLexer |
Definition at line 23 of file XdlScanner.cpp.
#define yyless | ( | n | ) |
Definition at line 1947 of file XdlScanner.cpp.
#define yyless | ( | n | ) |
Definition at line 1947 of file XdlScanner.cpp.
#define yymore | ( | ) | yymore_used_but_not_detected |
Definition at line 559 of file XdlScanner.cpp.
#define YYSTATE YY_START |
Definition at line 143 of file XdlScanner.cpp.
#define YYTABLES_NAME "yytables" |
Definition at line 2009 of file XdlScanner.cpp.
#define yyterminate | ( | ) | return token::END |
By default, yylex() returns int, but we want token_type instead. Unfortunately, yyterminate returns 0 by default, which is not of token_type.
Definition at line 604 of file XdlScanner.cpp.
#define yytext_ptr yytext |
Definition at line 309 of file XdlScanner.cpp.
typedef short int flex_int16_t |
Definition at line 56 of file XdlScanner.cpp.
typedef int flex_int32_t |
Definition at line 57 of file XdlScanner.cpp.
typedef signed char flex_int8_t |
Definition at line 55 of file XdlScanner.cpp.
typedef unsigned short int flex_uint16_t |
Definition at line 59 of file XdlScanner.cpp.
typedef unsigned int flex_uint32_t |
Definition at line 60 of file XdlScanner.cpp.
typedef unsigned char flex_uint8_t |
Definition at line 58 of file XdlScanner.cpp.
typedef torc::XdlParser::token token |
Import the parser's token types into a local typedef.
Definition at line 599 of file XdlScanner.cpp.
Definition at line 600 of file XdlScanner.cpp.
typedef struct yy_buffer_state* YY_BUFFER_STATE |
Definition at line 164 of file XdlScanner.cpp.
typedef unsigned char YY_CHAR |
Definition at line 307 of file XdlScanner.cpp.
typedef size_t yy_size_t |
Definition at line 193 of file XdlScanner.cpp.
if | ( | ! | yy_init | ) |
int isatty | ( | int | ) |
yylloc step | ( | ) |
Code belonging at the beginning of yylex().
while | ( | 1 | ) |
Definition at line 797 of file XdlScanner.cpp.
void * Xdlalloc | ( | yy_size_t | size | ) |
Bison lexer internals.
Definition at line 1987 of file XdlScanner.cpp.
void Xdlfree | ( | void * | ptr | ) |
Bison lexer internals.
Definition at line 2004 of file XdlScanner.cpp.
void * Xdlrealloc | ( | void * | ptr, |
yy_size_t | size | ||
) |
|
static |
Definition at line 362 of file XdlScanner.cpp.
|
static |
Definition at line 332 of file XdlScanner.cpp.
register int yy_act |
Definition at line 735 of file XdlScanner.cpp.
|
static |
Definition at line 425 of file XdlScanner.cpp.
register char * yy_bp |
Definition at line 734 of file XdlScanner.cpp.
|
static |
Definition at line 511 of file XdlScanner.cpp.
register char* yy_cp |
Definition at line 734 of file XdlScanner.cpp.
YY_DECL register yy_state_type yy_current_state |
The main scanner function which does all the work.
Definition at line 733 of file XdlScanner.cpp.
|
static |
Definition at line 448 of file XdlScanner.cpp.
|
static |
Definition at line 384 of file XdlScanner.cpp.
|
static |
Definition at line 416 of file XdlScanner.cpp.
|
static |
Definition at line 471 of file XdlScanner.cpp.
int yyleng |