mirror of
https://github.com/westes/flex.git
synced 2026-01-27 01:44:23 +00:00
refactor: Make functions in gen.c static...
... except make_tables() which is called from outside gen.c.
This commit is contained in:
parent
1f27fff775
commit
3adb336992
@ -799,8 +799,6 @@ extern void mkechar(int, int[], int[]);
|
||||
|
||||
/* from file gen.c */
|
||||
|
||||
extern void do_indent(void); /* indent to the current level */
|
||||
|
||||
/* Set a conditional amd make it visible in generated code */
|
||||
extern void visible_define (const char *);
|
||||
|
||||
@ -810,21 +808,6 @@ extern void visible_define_str (const char *, const char *);
|
||||
/* This time the value part is an int */
|
||||
extern void visible_define_int (const char *, const int);
|
||||
|
||||
/* Generate full speed compressed transition table. */
|
||||
extern void genctbl(void);
|
||||
|
||||
/* generate full transition table */
|
||||
extern void genftbl(void);
|
||||
|
||||
/* Generate data statements for the transition tables. */
|
||||
extern void gentabs(void);
|
||||
|
||||
/* Write out a formatted string at the current indentation level. */
|
||||
extern void indent_put2s(const char *, const char *);
|
||||
|
||||
/* Write out a string + newline at the current indentation level. */
|
||||
extern void indent_puts(const char *);
|
||||
|
||||
/* generate transition tables */
|
||||
extern void make_tables(void);
|
||||
|
||||
|
||||
12
src/gen.c
12
src/gen.c
@ -43,7 +43,7 @@ struct yy_trans_info {int32_t yy_verify; int32_t yy_nxt;};
|
||||
|
||||
/* declare functions that have forward references */
|
||||
|
||||
void genecs(void);
|
||||
static void genecs(void);
|
||||
|
||||
struct packtype_t *optimize_pack(size_t sz)
|
||||
{
|
||||
@ -243,7 +243,7 @@ static struct yytbl_data *mkssltbl (void)
|
||||
|
||||
/* genctbl - generates full speed compressed transition table */
|
||||
|
||||
void genctbl (void)
|
||||
static void genctbl(void)
|
||||
{
|
||||
int i;
|
||||
int end_of_buffer_action = num_rules + 1;
|
||||
@ -363,7 +363,7 @@ static struct yytbl_data *mkecstbl (void)
|
||||
|
||||
/* Generate equivalence-class tables. */
|
||||
|
||||
void genecs (void)
|
||||
static void genecs(void)
|
||||
{
|
||||
int ch, row;
|
||||
int numrows;
|
||||
@ -403,7 +403,7 @@ void genecs (void)
|
||||
* you should call mkecstbl() after this.
|
||||
*/
|
||||
|
||||
struct yytbl_data *mkftbl (void)
|
||||
static struct yytbl_data *mkftbl(void)
|
||||
{
|
||||
int i;
|
||||
int end_of_buffer_action = num_rules + 1;
|
||||
@ -437,7 +437,7 @@ struct yytbl_data *mkftbl (void)
|
||||
|
||||
/* genftbl - generate full transition table */
|
||||
|
||||
void genftbl (void)
|
||||
static void genftbl(void)
|
||||
{
|
||||
int i;
|
||||
int end_of_buffer_action = num_rules + 1;
|
||||
@ -474,7 +474,7 @@ void genftbl (void)
|
||||
|
||||
/* gentabs - generate data statements for the transition tables */
|
||||
|
||||
void gentabs (void)
|
||||
static void gentabs(void)
|
||||
{
|
||||
int sz, i, j, k, *accset, nacc, *acc_array, total_states;
|
||||
int end_of_buffer_action = num_rules + 1;
|
||||
|
||||
@ -72,7 +72,6 @@ int yytbl_hdr_fwrite (struct yytbl_writer *wr,
|
||||
const struct yytbl_hdr *th);
|
||||
int yytbl_data_fwrite (struct yytbl_writer *wr, struct yytbl_data *td);
|
||||
void yytbl_data_compress (struct yytbl_data *tbl);
|
||||
struct yytbl_data *mkftbl (void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user