Otawa
0.10
|
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <otawa/util/FlowFactLoader.h>
#include <otawa/dfa/State.h>
#include "util_fft_parser.h"
#include <unistd.h>
Namespaces | |
otawa | |
$Id$ Copyright (c) 2007, IRIT - UPS casse @iri t.fr | |
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 int | yy_state_type |
Functions | |
void | util_fft_restart (FILE *input_file) |
Immediately switch to a different input stream. More... | |
void | util_fft__switch_to_buffer (YY_BUFFER_STATE new_buffer) |
Switch to a different input buffer. More... | |
YY_BUFFER_STATE | util_fft__create_buffer (FILE *file, int size) |
Allocate and initialize an input buffer state. More... | |
void | util_fft__delete_buffer (YY_BUFFER_STATE b) |
Destroy the buffer. More... | |
void | util_fft__flush_buffer (YY_BUFFER_STATE b) |
Discard all buffered characters. More... | |
void | util_fft_push_buffer_state (YY_BUFFER_STATE new_buffer) |
Pushes the new state onto the stack. More... | |
void | util_fft_pop_buffer_state (void) |
Removes and deletes the top of the stack, if present. More... | |
YY_BUFFER_STATE | util_fft__scan_buffer (char *base, yy_size_t size) |
Setup the input buffer state to scan directly from a user-specified character buffer. More... | |
YY_BUFFER_STATE | util_fft__scan_string (yyconst char *yystr) |
Setup the input buffer state to scan a string. More... | |
YY_BUFFER_STATE | util_fft__scan_bytes (yyconst char *yybytes, int _yybytes_len) |
Setup the input buffer state to scan the given bytes. More... | |
void * | util_fft_alloc (yy_size_t) |
void * | util_fft_realloc (void *, yy_size_t) |
void | util_fft_free (void *) |
int | util_fft_lex_destroy (void) |
int | util_fft_get_debug (void) |
void | util_fft_set_debug (int debug_flag) |
YY_EXTRA_TYPE | util_fft_get_extra (void) |
void | util_fft_set_extra (YY_EXTRA_TYPE user_defined) |
FILE * | util_fft_get_in (void) |
Get the input stream. More... | |
void | util_fft_set_in (FILE *in_str) |
Set the input stream. More... | |
FILE * | util_fft_get_out (void) |
Get the output stream. More... | |
void | util_fft_set_out (FILE *out_str) |
int | util_fft_get_leng (void) |
Get the length of the current token. More... | |
char * | util_fft_get_text (void) |
Get the current token. More... | |
int | util_fft_get_lineno (void) |
Get the current line number. More... | |
void | util_fft_set_lineno (int line_number) |
Set the current line number. More... | |
int | util_fft_lex (void) |
if (!(yy_init)) | |
while (1) | |
int | isatty (int) |
Variables | |
int | util_fft_leng |
FILE * | util_fft_in = (FILE *) 0 |
FILE * | util_fft_out = (FILE *) 0 |
int | util_fft_lineno = 1 |
char * | util_fft_text |
int | util_fft__flex_debug = 0 |
elm::StringBuffer | buf |
int | otawa::fft_line = 0 |
YY_DECL | |
The main scanner function which does all the work. More... | |
register char * | yy_cp |
register char * | yy_bp |
register int | yy_act |
#define BEGIN (yy_start) = 1 + 2 * |
Referenced by while().
#define ECHO do { if (fwrite( util_fft_text, util_fft_leng, 1, util_fft_out )) {} } while (0) |
Referenced by while().
#define ECOM 1 |
Referenced by while().
#define EOB_ACT_CONTINUE_SCAN 0 |
Referenced by while().
#define EOB_ACT_END_OF_FILE 1 |
Referenced by while().
#define EOB_ACT_LAST_MATCH 2 |
Referenced by while().
#define FLEX_BETA |
#define FLEX_SCANNER |
#define FLEXINT_H |
#define INITIAL 0 |
Referenced by while().
#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 STR 3 |
Referenced by while().
#define TCOM 2 |
Referenced by while().
#define UINT16_MAX (65535U) |
#define UINT32_MAX (4294967295U) |
#define UINT8_MAX (255U) |
#define unput | ( | c | ) | yyunput( c, (yytext_ptr) ) |
#define util_fft_wrap | ( | n | ) | 1 |
Referenced by while().
#define YY_AT_BOL | ( | ) | (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
#define YY_BREAK break; |
Referenced by while().
#define YY_BUF_SIZE 16384 |
Referenced by if(), and util_fft_restart().
#define YY_BUFFER_EOF_PENDING 2 |
#define YY_BUFFER_NEW 0 |
Referenced by util_fft__flush_buffer(), util_fft__scan_buffer(), and while().
#define YY_BUFFER_NORMAL 1 |
Referenced by while().
#define yy_create_buffer util_fft__create_buffer |
#define YY_CURRENT_BUFFER |
Referenced by if(), util_fft__delete_buffer(), util_fft__flush_buffer(), util_fft__switch_to_buffer(), util_fft_lex_destroy(), util_fft_pop_buffer_state(), util_fft_push_buffer_state(), and util_fft_restart().
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
#define YY_DECL int util_fft_lex (void) |
#define YY_DECL_IS_OURS 1 |
#define yy_delete_buffer util_fft__delete_buffer |
#define YY_DO_BEFORE_ACTION |
#define YY_END_OF_BUFFER 60 |
Referenced by while().
#define YY_END_OF_BUFFER_CHAR 0 |
Referenced by util_fft__flush_buffer(), util_fft__scan_buffer(), and util_fft__scan_bytes().
#define YY_EXIT_FAILURE 2 |
#define YY_EXTRA_TYPE void * |
#define YY_FATAL_ERROR | ( | msg | ) | yy_fatal_error( msg ) |
Referenced by util_fft__create_buffer(), util_fft__scan_buffer(), util_fft__scan_bytes(), and while().
#define yy_flex_debug util_fft__flex_debug |
#define YY_FLEX_MAJOR_VERSION 2 |
#define YY_FLEX_MINOR_VERSION 5 |
#define YY_FLEX_SUBMINOR_VERSION 35 |
#define yy_flush_buffer util_fft__flush_buffer |
#define YY_FLUSH_BUFFER util_fft__flush_buffer(YY_CURRENT_BUFFER ) |
#define yy_init_buffer util_fft__init_buffer |
#define YY_INPUT | ( | buf, | |
result, | |||
max_size | |||
) |
#define YY_INT_ALIGNED short int |
#define YY_LESS_LINENO | ( | n | ) |
#define yy_load_buffer_state util_fft__load_buffer_state |
#define YY_MORE_ADJ 0 |
Referenced by while().
#define yy_new_buffer util_fft__create_buffer |
#define YY_NEW_FILE util_fft_restart(util_fft_in ) |
Referenced by while().
#define YY_NULL 0 |
#define YY_NUM_RULES 59 |
#define YY_READ_BUF_SIZE 8192 |
#define YY_RESTORE_YY_MORE_OFFSET |
Referenced by while().
#define YY_RULE_SETUP YY_USER_ACTION |
Referenced by while().
#define YY_SC_TO_UI | ( | c | ) | ((unsigned int) (unsigned char) c) |
Referenced by while().
#define yy_set_bol | ( | at_bol | ) |
#define yy_set_interactive | ( | is_interactive | ) |
#define YY_SKIP_YYWRAP |
#define YY_START (((yy_start) - 1) / 2) |
Referenced by while().
#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) |
Referenced by while().
#define YY_STRUCT_YY_BUFFER_STATE |
#define yy_switch_to_buffer util_fft__switch_to_buffer |
#define YY_TYPEDEF_YY_BUFFER_STATE |
#define YY_TYPEDEF_YY_SIZE_T |
#define YY_USER_ACTION |
#define yyalloc util_fft_alloc |
#define yyconst |
#define yyfree util_fft_free |
#define yyin util_fft_in |
#define yyleng util_fft_leng |
#define yyless | ( | n | ) |
#define yyless | ( | n | ) |
#define yylex util_fft_lex |
#define yylineno util_fft_lineno |
#define yymore | ( | ) | yymore_used_but_not_detected |
#define yyout util_fft_out |
#define yyrealloc util_fft_realloc |
#define yyrestart util_fft_restart |
#define YYSTATE YY_START |
#define YYTABLES_NAME "yytables" |
#define yytext util_fft_text |
#define yytext_ptr util_fft_text |
Referenced by while().
#define yywrap util_fft_wrap |
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 struct yy_buffer_state* YY_BUFFER_STATE |
typedef unsigned char YY_CHAR |
typedef int yy_state_type |
if | ( | ! | yy_init | ) |
References util_fft__create_buffer(), util_fft_in, util_fft_out, YY_BUF_SIZE, YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
int isatty | ( | int | ) |
YY_BUFFER_STATE util_fft__create_buffer | ( | FILE * | file, |
int | size | ||
) |
Allocate and initialize an input buffer state.
file | A readable stream. |
size | The character buffer size in bytes. When in doubt, use YY_BUF_SIZE . |
References util_fft_alloc(), and YY_FATAL_ERROR.
Referenced by if(), and util_fft_restart().
void util_fft__delete_buffer | ( | YY_BUFFER_STATE | b | ) |
Destroy the buffer.
b | a buffer created with util_fft__create_buffer() |
References util_fft_free(), YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
Referenced by util_fft_lex_destroy(), and util_fft_pop_buffer_state().
void util_fft__flush_buffer | ( | YY_BUFFER_STATE | b | ) |
Discard all buffered characters.
On the next scan, YY_INPUT will be called.
b | the buffer state to be flushed, usually YY_CURRENT_BUFFER . |
References YY_BUFFER_NEW, YY_CURRENT_BUFFER, and YY_END_OF_BUFFER_CHAR.
YY_BUFFER_STATE util_fft__scan_buffer | ( | char * | base, |
yy_size_t | size | ||
) |
Setup the input buffer state to scan directly from a user-specified character buffer.
base | the character buffer |
size | the size in bytes of the character buffer |
References base(), util_fft__switch_to_buffer(), util_fft_alloc(), YY_BUFFER_NEW, YY_END_OF_BUFFER_CHAR, and YY_FATAL_ERROR.
Referenced by util_fft__scan_bytes().
YY_BUFFER_STATE util_fft__scan_bytes | ( | yyconst char * | yybytes, |
int | _yybytes_len | ||
) |
Setup the input buffer state to scan the given bytes.
The next call to util_fft_lex() will scan from a copy of bytes.
yybytes | the byte buffer to scan |
_yybytes_len | the number of bytes in the buffer pointed to by bytes. |
References buf, util_fft__scan_buffer(), util_fft_alloc(), YY_END_OF_BUFFER_CHAR, and YY_FATAL_ERROR.
Referenced by util_fft__scan_string().
YY_BUFFER_STATE util_fft__scan_string | ( | yyconst char * | yystr | ) |
Setup the input buffer state to scan a string.
The next call to util_fft_lex() will scan from a copy of str.
yystr | a NUL-terminated string to scan |
References util_fft__scan_bytes().
void util_fft__switch_to_buffer | ( | YY_BUFFER_STATE | new_buffer | ) |
Switch to a different input buffer.
new_buffer | The new input buffer. |
References YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
Referenced by util_fft__scan_buffer().
void * util_fft_alloc | ( | yy_size_t | size | ) |
References malloc().
Referenced by util_fft__create_buffer(), util_fft__scan_buffer(), and util_fft__scan_bytes().
void util_fft_free | ( | void * | ptr | ) |
References free().
Referenced by util_fft__delete_buffer(), and util_fft_lex_destroy().
int util_fft_get_debug | ( | void | ) |
References util_fft__flex_debug.
YY_EXTRA_TYPE util_fft_get_extra | ( | void | ) |
FILE * util_fft_get_in | ( | void | ) |
Get the input stream.
References util_fft_in.
int util_fft_get_leng | ( | void | ) |
Get the length of the current token.
References util_fft_leng.
int util_fft_get_lineno | ( | void | ) |
Get the current line number.
References util_fft_lineno.
FILE * util_fft_get_out | ( | void | ) |
Get the output stream.
References util_fft_out.
char * util_fft_get_text | ( | void | ) |
Get the current token.
References util_fft_text.
int util_fft_lex | ( | void | ) |
int util_fft_lex_destroy | ( | void | ) |
void util_fft_pop_buffer_state | ( | void | ) |
Removes and deletes the top of the stack, if present.
The next element becomes the new top.
References util_fft__delete_buffer(), YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
Referenced by util_fft_lex_destroy().
void util_fft_push_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.
new_buffer | The new state. |
References YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
void * util_fft_realloc | ( | void * | ptr, |
yy_size_t | size | ||
) |
void util_fft_restart | ( | FILE * | input_file | ) |
Immediately switch to a different input stream.
input_file | A readable stream. |
INITIAL
. References util_fft__create_buffer(), util_fft_in, YY_BUF_SIZE, YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
void util_fft_set_debug | ( | int | debug_flag | ) |
void util_fft_set_extra | ( | YY_EXTRA_TYPE | user_defined | ) |
void util_fft_set_in | ( | FILE * | in_str | ) |
Set the input stream.
This does not discard the current input buffer.
in_str | A readable stream. |
References util_fft_in.
void util_fft_set_lineno | ( | int | line_number | ) |
Set the current line number.
line_number |
void util_fft_set_out | ( | FILE * | out_str | ) |
References util_fft_out.
while | ( | 1 | ) |
References BAD_TOKEN, BEGIN, elm::cerr, otawa::CHECKSUM, elm::StringBuffer::copyString(), DOT_DOT, ECHO, ECOM, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, otawa::fft_line, INITIAL, otawa::Type::int16_type, otawa::Type::int32_type, otawa::Type::int64_type, otawa::Type::int8_type, INTEGER, KW_ACCESS, KW_CALL, KW_CONTROL, KW_DOINLINE, KW_ENTRY, KW_IGNORE, KW_IGNORECONTROL, KW_IGNORESEQ, KW_IN, KW_INLINING_OFF, KW_INLINING_ON, KW_LIBRARY, KW_MAX, KW_MEMORY, KW_MULTIBRANCH, KW_MULTICALL, KW_NO, KW_NOCALL, KW_NOINLINE, KW_PRESERVE, KW_SEQ, KW_TO, KW_TOTAL, LOOP, NORETURN, elm::StringBuffer::reset(), RETURN, STR, STRING, TCOM, TYPE, otawa::Type::uint16_type, otawa::Type::uint32_type, otawa::Type::uint64_type, otawa::Type::uint8_type, util_fft_in, util_fft_lval, util_fft_text, util_fft_wrap, YY_BREAK, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_cp, YY_CURRENT_BUFFER_LVALUE, YY_DO_BEFORE_ACTION, YY_END_OF_BUFFER, YY_FATAL_ERROR, YY_MORE_ADJ, YY_NEW_FILE, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, YY_STATE_EOF, yyterminate, and yytext_ptr.
Referenced by otawa::GraphBBTime< G >::analyzePathContext(), ast__scan_bytes(), otawa::display::GraphVizItem::attributes(), otawa::Manager::buildPaths(), otawa::hard::CacheConfiguration::cacheName(), otawa::etime::EdgeTimeBuilder::contributeSplit(), otawa::display::AbstractDrawer::draw(), otawa::escape(), otawa::Manager::findFileLoader(), otawa::WorkSpace::format(), otawa::Identifier< T >::fromString(), otawa::VarTextDecoder::getBytes(), otawa::display::GraphVizItem::getPropertiesString(), otawa::sim::Exception::header(), ipet__scan_bytes(), otawa::Manager::loadBin(), makeAddress(), otawa::ipet::VarAssignment::makeEdgeVar(), otawa::ipet::VarAssignment::makeNodeVar(), otawa::tsim::BBPath::makeVarName(), otawa::etime::maskToString(), otawa::FlowFactLoader::onCheckSum(), otawa::CFGCheckSummer::processCFG(), otawa::cat::CATConstraintBuilder::processLBlockSet(), otawa::ccg::ConstraintBuilder::processLBlockSet(), otawa::cfgio::Output::processProps(), otawa::dcache::CatConstraintBuilder::processWorkSpace(), otawa::display::quoteNewlines(), otawa::display::quoteSpecials(), otawa::FlowFactLoader::scanBound(), otawa::FlowFactLoader::scanInt(), otawa::FlowFactLoader::scanUInt(), otawa::display::AbstractDrawer::Vertex::setup(), otawa::display::AbstractDrawer::Edge::setup(), otawa::etime::Config::toString(), and util_fft__scan_bytes().
int util_fft__flex_debug = 0 |
Referenced by util_fft_get_debug().
FILE * util_fft_in = (FILE *) 0 |
Referenced by if(), util_fft_get_in(), util_fft_restart(), util_fft_set_in(), and while().
int util_fft_leng |
Referenced by util_fft_get_leng().
int util_fft_lineno = 1 |
Referenced by util_fft_get_lineno().
FILE * util_fft_out = (FILE *) 0 |
Referenced by if(), util_fft_get_out(), and util_fft_set_out().
char * util_fft_text |
Referenced by util_fft_get_text(), and while().
register int yy_act |
register char * yy_bp |
register char* yy_cp |
Referenced by while().
YY_DECL |
The main scanner function which does all the work.