mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
* src/vcg.h (graph_s): color, textcolor, bordercolor are now
enum color_e. * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm to `normal'. * src/reader.c (parse_token_decl): Initialize token with tok_eof. * src/lex.h: Adjust prototype. (token_t): Add `tok_undef'. * src/lex.c (struct percent_table_struct): Retval is now a token_t. (parse_percent_token): Now returns token_t. Add default statement in switch. (lex): Separate `c' as an input variable, from the token_t result part. (unlexed): Is a token_t.
This commit is contained in:
16
ChangeLog
16
ChangeLog
@@ -1,3 +1,19 @@
|
|||||||
|
2001-09-10 Marc Autret <autret_m@epita.fr>, Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* src/vcg.h (graph_s): color, textcolor, bordercolor are now
|
||||||
|
enum color_e.
|
||||||
|
* src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
|
||||||
|
to `normal'.
|
||||||
|
* src/reader.c (parse_token_decl): Initialize token with tok_eof.
|
||||||
|
* src/lex.h: Adjust prototype.
|
||||||
|
(token_t): Add `tok_undef'.
|
||||||
|
* src/lex.c (struct percent_table_struct): Retval is now a token_t.
|
||||||
|
(parse_percent_token): Now returns token_t.
|
||||||
|
Add default statement in switch.
|
||||||
|
(lex): Separate `c' as an input variable, from the token_t result
|
||||||
|
part.
|
||||||
|
(unlexed): Is a token_t.
|
||||||
|
|
||||||
2001-09-10 Akim Demaille <akim@epita.fr>
|
2001-09-10 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* configure.in: Bump to 1.29a.
|
* configure.in: Bump to 1.29a.
|
||||||
|
|||||||
27
src/lex.c
27
src/lex.c
@@ -36,15 +36,17 @@ const char *token_buffer = NULL;
|
|||||||
bucket *symval;
|
bucket *symval;
|
||||||
int numval;
|
int numval;
|
||||||
|
|
||||||
static int unlexed; /* these two describe a token to be reread */
|
/* these two describe a token to be reread */
|
||||||
static bucket *unlexed_symval; /* by the next call to lex */
|
static token_t unlexed = tok_undef;
|
||||||
|
/* by the next call to lex */
|
||||||
|
static bucket *unlexed_symval = NULL;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
init_lex (void)
|
init_lex (void)
|
||||||
{
|
{
|
||||||
obstack_init (&token_obstack);
|
obstack_init (&token_obstack);
|
||||||
unlexed = -1;
|
unlexed = tok_undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -356,12 +358,12 @@ lex (void)
|
|||||||
/* Just to make sure. */
|
/* Just to make sure. */
|
||||||
token_buffer = NULL;
|
token_buffer = NULL;
|
||||||
|
|
||||||
if (unlexed >= 0)
|
if (unlexed != tok_undef)
|
||||||
{
|
{
|
||||||
|
token_t res = unlexed;
|
||||||
symval = unlexed_symval;
|
symval = unlexed_symval;
|
||||||
c = unlexed;
|
unlexed = tok_undef;
|
||||||
unlexed = -1;
|
return res;
|
||||||
return c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
c = skip_white_space ();
|
c = skip_white_space ();
|
||||||
@@ -516,7 +518,7 @@ struct percent_table_struct
|
|||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
void *set_flag;
|
void *set_flag;
|
||||||
int retval;
|
token_t retval;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct percent_table_struct percent_table[] =
|
struct percent_table_struct percent_table[] =
|
||||||
@@ -566,13 +568,12 @@ struct percent_table_struct percent_table[] =
|
|||||||
/* Parse a token which starts with %.
|
/* Parse a token which starts with %.
|
||||||
Assumes the % has already been read and discarded. */
|
Assumes the % has already been read and discarded. */
|
||||||
|
|
||||||
int
|
token_t
|
||||||
parse_percent_token (void)
|
parse_percent_token (void)
|
||||||
{
|
{
|
||||||
int c;
|
|
||||||
struct percent_table_struct *tx;
|
struct percent_table_struct *tx;
|
||||||
|
|
||||||
c = getc (finput);
|
int c = getc (finput);
|
||||||
|
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
@@ -635,6 +636,10 @@ parse_percent_token (void)
|
|||||||
case tok_obsolete:
|
case tok_obsolete:
|
||||||
fatal (_("`%s' is no longer supported"), token_buffer);
|
fatal (_("`%s' is no longer supported"), token_buffer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
/* Other cases do not apply here. */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return tx->retval;
|
return tx->retval;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
/* Token-type codes. */
|
/* Token-type codes. */
|
||||||
typedef enum token_e
|
typedef enum token_e
|
||||||
{
|
{
|
||||||
|
tok_undef, /* Not defined. Used to initial token_t vars. */
|
||||||
tok_eof,
|
tok_eof,
|
||||||
tok_identifier,
|
tok_identifier,
|
||||||
tok_comma,
|
tok_comma,
|
||||||
@@ -71,6 +72,6 @@ void read_type_name PARAMS ((FILE *fin));
|
|||||||
|
|
||||||
token_t lex PARAMS ((void));
|
token_t lex PARAMS ((void));
|
||||||
|
|
||||||
int parse_percent_token PARAMS ((void));
|
token_t parse_percent_token PARAMS ((void));
|
||||||
|
|
||||||
#endif /* !LEX_H_ */
|
#endif /* !LEX_H_ */
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ print_graph (void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
graph.display_edge_labels = yes;
|
graph.display_edge_labels = yes;
|
||||||
graph.layoutalgorithm = 0;
|
graph.layoutalgorithm = normal;
|
||||||
|
|
||||||
graph.port_sharing = no;
|
graph.port_sharing = no;
|
||||||
graph.finetuning = yes;
|
graph.finetuning = yes;
|
||||||
|
|||||||
@@ -462,8 +462,8 @@ copy_definition (void)
|
|||||||
static void
|
static void
|
||||||
parse_token_decl (symbol_class what_is, symbol_class what_is_not)
|
parse_token_decl (symbol_class what_is, symbol_class what_is_not)
|
||||||
{
|
{
|
||||||
token_t token = 0;
|
token_t token = tok_undef;
|
||||||
char *typename = 0;
|
char *typename = NULL;
|
||||||
|
|
||||||
/* The symbol being defined. */
|
/* The symbol being defined. */
|
||||||
struct bucket *symbol = NULL;
|
struct bucket *symbol = NULL;
|
||||||
|
|||||||
@@ -501,19 +501,19 @@ struct graph_s
|
|||||||
index 2, green has index 3, etc.
|
index 2, green has index 3, etc.
|
||||||
Default is white for background and white or transparent for summary
|
Default is white for background and white or transparent for summary
|
||||||
nodes. */
|
nodes. */
|
||||||
unsigned char color;
|
enum color_e color;
|
||||||
|
|
||||||
/* Textcolor.
|
/* Textcolor.
|
||||||
need explainations ???
|
need explainations ???
|
||||||
defalut is black for summary nodes. */
|
defalut is black for summary nodes. */
|
||||||
unsigned char textcolor;
|
enum color_e textcolor;
|
||||||
|
|
||||||
/* Bordercolor is the color of the summary node's border. Default color
|
/* Bordercolor is the color of the summary node's border. Default color
|
||||||
is the textcolor. width, height are width and height of the
|
is the textcolor. width, height are width and height of the
|
||||||
displayed part of the window of the outermost graph in pixels, or
|
displayed part of the window of the outermost graph in pixels, or
|
||||||
width and height of the summary node of inner subgraphs.
|
width and height of the summary node of inner subgraphs.
|
||||||
Default is the defalut of the textcolor. */
|
Default is the defalut of the textcolor. */
|
||||||
unsigned char bordercolor;
|
enum color_e bordercolor;
|
||||||
|
|
||||||
/* Width, height are width and height of the displayed part of the
|
/* Width, height are width and height of the displayed part of the
|
||||||
window of the outermost graph in pixels, or width and height of the
|
window of the outermost graph in pixels, or width and height of the
|
||||||
|
|||||||
Reference in New Issue
Block a user