Graphviz
2.41.20171026.1811
|
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <grammar.h>
#include <cghdr.h>
#include <agxbuf.h>
#include <ctype.h>
#include <unistd.h>
Go to the source code of this file.
Data Structures | |
struct | aag_buffer_state |
struct | aag_trans_info |
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 37 |
#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 | aagconst |
#define | YY_NULL 0 |
#define | YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
#define | BEGIN (aag_start) = 1 + 2 * |
#define | YY_START (((aag_start) - 1) / 2) |
#define | YYSTATE YY_START |
#define | YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
#define | YY_NEW_FILE aagrestart(aagin ) |
#define | YY_END_OF_BUFFER_CHAR 0 |
#define | YY_BUF_SIZE 16384 |
#define | YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(aag_state_type)) |
#define | YY_TYPEDEF_YY_BUFFER_STATE |
#define | YY_TYPEDEF_YY_SIZE_T |
#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 | aagless(n) |
#define | unput(c) aagunput( c, (aagtext_ptr) ) |
#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 (aag_buffer_stack)[(aag_buffer_stack_top)] |
#define | YY_FLUSH_BUFFER aag_flush_buffer(YY_CURRENT_BUFFER ) |
#define | aag_new_buffer aag_create_buffer |
#define | aag_set_interactive(is_interactive) |
#define | aag_set_bol(at_bol) |
#define | YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->aag_at_bol) |
#define | aagtext_ptr aagtext |
#define | YY_DO_BEFORE_ACTION |
#define | YY_NUM_RULES 34 |
#define | YY_END_OF_BUFFER 35 |
#define | REJECT reject_used_but_not_detected |
#define | aagmore() aagmore_used_but_not_detected |
#define | YY_MORE_ADJ 0 |
#define | YY_RESTORE_YY_MORE_OFFSET |
#define | GRAPH_EOF_TOKEN '@' /* lex class must be defined below */ |
#define | isatty(x) 0 |
#define | YY_INPUT(buf, result, max_size) |
#define | INITIAL 0 |
#define | comment 1 |
#define | qstring 2 |
#define | hstring 3 |
#define | YY_EXTRA_TYPE void * |
#define | YY_READ_BUF_SIZE 8192 |
#define | ECHO do { if (fwrite( aagtext, aagleng, 1, aagout )) {} } while (0) |
#define | aagterminate() return YY_NULL |
#define | YY_START_STACK_INCR 25 |
#define | YY_FATAL_ERROR(msg) aag_fatal_error( msg ) |
#define | YY_DECL_IS_OURS 1 |
#define | YY_DECL int aaglex (void) |
#define | YY_USER_ACTION |
#define | YY_BREAK break; |
#define | YY_RULE_SETUP |
#define | YY_EXIT_FAILURE 2 |
#define | aagless(n) |
#define | YYTABLES_NAME "aagtables" |
#define | YY_CALL_ONLY_ARG void |
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 aag_buffer_state * | YY_BUFFER_STATE |
typedef size_t | aag_size_t |
typedef unsigned char | YY_CHAR |
typedef int | aag_state_type |
Variables | |
aag_size_t | aagleng |
FILE * | aagin = (FILE *) 0 |
FILE * | aagout = (FILE *) 0 |
int | aaglineno = 1 |
char * | aagtext |
int | aag_flex_debug = 0 |
YY_DECL | |
register char * | aag_cp |
register char * | aag_bp |
register int | aag_act |
#define aag_new_buffer aag_create_buffer |
#define aag_set_bol | ( | at_bol | ) |
#define aag_set_interactive | ( | is_interactive | ) |
#define aagless | ( | n | ) |
Definition at line 1980 of file scan.c.
Referenced by while().
#define aagless | ( | n | ) |
#define aagterminate | ( | ) | return YY_NULL |
#define BEGIN (aag_start) = 1 + 2 * |
Definition at line 125 of file scan.c.
Referenced by aagerror(), and while().
#define comment 1 |
Definition at line 727 of file scan.c.
Referenced by aagerror(), and while().
#define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */ |
Definition at line 559 of file scan.c.
Referenced by aglexeof().
#define hstring 3 |
Definition at line 729 of file scan.c.
Referenced by aagerror(), and while().
#define INITIAL 0 |
Definition at line 726 of file scan.c.
Referenced by aagerror(), and while().
#define qstring 2 |
Definition at line 728 of file scan.c.
Referenced by aagerror(), and while().
#define unput | ( | c | ) | aagunput( c, (aagtext_ptr) ) |
Definition at line 185 of file scan.c.
Referenced by aglexeof().
#define YY_AT_BOL | ( | ) | (YY_CURRENT_BUFFER_LVALUE->aag_at_bol) |
#define YY_BUF_SIZE 16384 |
Definition at line 144 of file scan.c.
Referenced by aagerror(), aagrestart(), and if().
#define YY_BUFFER_NEW 0 |
Definition at line 235 of file scan.c.
Referenced by aag_flush_buffer(), aag_scan_buffer(), and while().
#define YY_CURRENT_BUFFER |
Definition at line 263 of file scan.c.
Referenced by aag_delete_buffer(), aag_flush_buffer(), aag_switch_to_buffer(), aaglex_destroy(), aagpop_buffer_state(), aagpush_buffer_state(), and aagrestart().
#define YY_CURRENT_BUFFER_LVALUE (aag_buffer_stack)[(aag_buffer_stack_top)] |
Definition at line 270 of file scan.c.
Referenced by aag_delete_buffer(), aag_switch_to_buffer(), aaglex_destroy(), aagpop_buffer_state(), aagpush_buffer_state(), aagrestart(), if(), and while().
#define YY_DO_BEFORE_ACTION |
#define YY_END_OF_BUFFER_CHAR 0 |
Definition at line 140 of file scan.c.
Referenced by aag_flush_buffer(), aag_scan_buffer(), and aag_scan_bytes().
#define YY_FATAL_ERROR | ( | msg | ) | aag_fatal_error( msg ) |
Definition at line 870 of file scan.c.
Referenced by aag_create_buffer(), aag_scan_buffer(), aag_scan_bytes(), and while().
#define YY_FLUSH_BUFFER aag_flush_buffer(YY_CURRENT_BUFFER ) |
Definition at line 299 of file scan.c.
Referenced by aglexbad().
#define YY_INPUT | ( | buf, | |
result, | |||
max_size | |||
) |
#define YY_NEW_FILE aagrestart(aagin ) |
#define YY_RULE_SETUP |
Definition at line 898 of file scan.c.
Referenced by while().
#define YY_SC_TO_UI | ( | c | ) | ((unsigned int) (unsigned char) c) |
#define YY_START (((aag_start) - 1) / 2) |
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(aag_state_type)) |
#define YY_STATE_EOF | ( | state | ) | (YY_END_OF_BUFFER + state + 1) |
#define YYSTATE YY_START |
Definition at line 132 of file scan.c.
Referenced by aagerror().
typedef size_t aag_size_t |
typedef int aag_state_type |
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 aag_buffer_state* YY_BUFFER_STATE |
YY_BUFFER_STATE aag_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 . |
Definition at line 1685 of file scan.c.
References aag_buffer_state::aag_buf_size, aag_buffer_state::aag_ch_buf, aag_buffer_state::aag_is_our_buffer, aagalloc(), and YY_FATAL_ERROR.
Referenced by aagrestart(), and if().
void aag_delete_buffer | ( | YY_BUFFER_STATE | b | ) |
Destroy the buffer.
b | a buffer created with aag_create_buffer() |
Definition at line 1713 of file scan.c.
References aag_buffer_state::aag_ch_buf, aag_buffer_state::aag_is_our_buffer, aagfree(), YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
Referenced by aaglex_destroy(), and aagpop_buffer_state().
void aag_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 . |
Definition at line 1760 of file scan.c.
References aag_buffer_state::aag_at_bol, aag_buffer_state::aag_buf_pos, aag_buffer_state::aag_buffer_status, aag_buffer_state::aag_ch_buf, aag_buffer_state::aag_n_chars, YY_BUFFER_NEW, YY_CURRENT_BUFFER, and YY_END_OF_BUFFER_CHAR.
YY_BUFFER_STATE aag_scan_buffer | ( | char * | base, |
aag_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 |
Definition at line 1887 of file scan.c.
References aag_buffer_state::aag_at_bol, aag_buffer_state::aag_buf_pos, aag_buffer_state::aag_buf_size, aag_buffer_state::aag_buffer_status, aag_buffer_state::aag_ch_buf, aag_buffer_state::aag_fill_buffer, aag_buffer_state::aag_input_file, aag_buffer_state::aag_is_interactive, aag_buffer_state::aag_is_our_buffer, aag_buffer_state::aag_n_chars, aag_switch_to_buffer(), aagalloc(), YY_BUFFER_NEW, YY_END_OF_BUFFER_CHAR, and YY_FATAL_ERROR.
Referenced by aag_scan_bytes().
YY_BUFFER_STATE aag_scan_bytes | ( | aagconst char * | aagbytes, |
aag_size_t | _aagbytes_len | ||
) |
Setup the input buffer state to scan the given bytes. The next call to aaglex() will scan from a copy of bytes.
aagbytes | the byte buffer to scan |
_aagbytes_len | the number of bytes in the buffer pointed to by bytes. |
Definition at line 1937 of file scan.c.
References aag_buffer_state::aag_is_our_buffer, aag_scan_buffer(), aagalloc(), YY_END_OF_BUFFER_CHAR, and YY_FATAL_ERROR.
Referenced by aag_scan_string().
YY_BUFFER_STATE aag_scan_string | ( | aagconst char * | aagstr | ) |
Setup the input buffer state to scan a string. The next call to aaglex() will scan from a copy of str.
aagstr | a NUL-terminated string to scan |
Definition at line 1924 of file scan.c.
References aag_scan_bytes().
void aag_switch_to_buffer | ( | YY_BUFFER_STATE | new_buffer | ) |
Switch to a different input buffer.
new_buffer | The new input buffer. |
Definition at line 1640 of file scan.c.
References YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
Referenced by aag_scan_buffer().
void * aagalloc | ( | aag_size_t | size | ) |
Definition at line 2148 of file scan.c.
Referenced by aag_create_buffer(), aag_scan_buffer(), and aag_scan_bytes().
void aagerror | ( | char * | str | ) |
void aagfree | ( | void * | ptr | ) |
Definition at line 2165 of file scan.c.
Referenced by aag_delete_buffer(), and aaglex_destroy().
int aagget_debug | ( | void | ) |
Definition at line 2064 of file scan.c.
References aag_flex_debug.
YY_EXTRA_TYPE aagget_extra | ( | void | ) |
FILE * aagget_in | ( | void | ) |
aag_size_t aagget_leng | ( | void | ) |
int aagget_lineno | ( | void | ) |
FILE * aagget_out | ( | void | ) |
char * aagget_text | ( | void | ) |
int aaglex | ( | void | ) |
int aaglex_destroy | ( | void | ) |
Definition at line 2103 of file scan.c.
References aag_delete_buffer(), aagfree(), aagpop_buffer_state(), NULL, YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
void aagpop_buffer_state | ( | void | ) |
Removes and deletes the top of the stack, if present. The next element becomes the new top.
Definition at line 1819 of file scan.c.
References aag_delete_buffer(), NULL, YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
Referenced by aaglex_destroy().
void aagpush_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. |
Definition at line 1789 of file scan.c.
References NULL, YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
void * aagrealloc | ( | void * | ptr, |
aag_size_t | size | ||
) |
void aagrestart | ( | FILE * | input_file | ) |
Immediately switch to a different input stream.
input_file | A readable stream. |
INITIAL
. Definition at line 1623 of file scan.c.
References aag_create_buffer(), aagin, YY_BUF_SIZE, YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
void aagset_extra | ( | YY_EXTRA_TYPE | user_defined | ) |
void aagset_in | ( | FILE * | in_str | ) |
Set the input stream. This does not discard the current input buffer.
in_str | A readable stream. |
Definition at line 2054 of file scan.c.
References aagin.
void aagset_lineno | ( | int | line_number | ) |
int aagwrap | ( | YY_CALL_ONLY_ARG | ) |
void aglexbad | ( | void | ) |
void aglexeof | ( | void | ) |
Definition at line 2229 of file scan.c.
References GRAPH_EOF_TOKEN, and unput.
void aglexinit | ( | Agdisc_t * | disc, |
void * | ifile | ||
) |
Definition at line 579 of file scan.c.
Referenced by agconcat().
void agsetfile | ( | char * | f | ) |
Definition at line 573 of file scan.c.
Referenced by agmemread(), and gvNextInputGraph().
if | ( | ! | YY_CURRENT_BUFFER | ) |
Definition at line 933 of file scan.c.
References aag_create_buffer(), aagin, YY_BUF_SIZE, and YY_CURRENT_BUFFER_LVALUE.
while | ( | 1 | ) |
Definition at line 942 of file scan.c.
References aag_cp, aagin, aagleng, aagless, aaglval, aagterminate, aagtext_ptr, aagwrap(), Ag_G_global, agstrdup(), BEGIN, comment, ECHO, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, hstring, INITIAL, int, qstring, YYSTYPE::str, T_atom, T_digraph, T_edge, T_edgeop, T_graph, T_node, T_qatom, T_strict, T_subgraph, YY_AT_BOL, YY_BREAK, YY_BUFFER_NEW, YY_BUFFER_NORMAL, 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, and YY_STATE_EOF.
int aag_flex_debug = 0 |
Definition at line 530 of file scan.c.
Referenced by aagget_debug().
aag_size_t aagleng |
Definition at line 275 of file scan.c.
Referenced by aagget_leng(), and while().
int aaglineno = 1 |
Definition at line 343 of file scan.c.
Referenced by aagget_lineno().
FILE * aagout = (FILE *) 0 |
Definition at line 337 of file scan.c.
Referenced by aagget_out(), and aagset_out().
char * aagtext |
Definition at line 539 of file scan.c.
Referenced by aagget_text().
YY_DECL |
The main scanner function which does all the work.