summaryrefslogtreecommitdiffstats
path: root/usr.bin/yacc
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-03-22 01:42:45 +0000
committerimp <imp@FreeBSD.org>2002-03-22 01:42:45 +0000
commit0b20191705a346bc322deac818912bd4eab96a1b (patch)
treef17746dd42b66c7b55fe407e00b5fc176ebe67a5 /usr.bin/yacc
parent1698cb216e2d4ca62662103eba0191f134923698 (diff)
downloadFreeBSD-src-0b20191705a346bc322deac818912bd4eab96a1b.zip
FreeBSD-src-0b20191705a346bc322deac818912bd4eab96a1b.tar.gz
remove __P
Diffstat (limited to 'usr.bin/yacc')
-rw-r--r--usr.bin/yacc/closure.c8
-rw-r--r--usr.bin/yacc/defs.h101
-rw-r--r--usr.bin/yacc/error.c2
-rw-r--r--usr.bin/yacc/lalr.c32
-rw-r--r--usr.bin/yacc/lr0.c28
-rw-r--r--usr.bin/yacc/main.c12
-rw-r--r--usr.bin/yacc/mkpar.c22
-rw-r--r--usr.bin/yacc/output.c52
-rw-r--r--usr.bin/yacc/reader.c74
-rw-r--r--usr.bin/yacc/symtab.c2
-rw-r--r--usr.bin/yacc/verbose.c20
-rw-r--r--usr.bin/yacc/warshall.c2
12 files changed, 177 insertions, 178 deletions
diff --git a/usr.bin/yacc/closure.c b/usr.bin/yacc/closure.c
index f7e7b55..532caf6 100644
--- a/usr.bin/yacc/closure.c
+++ b/usr.bin/yacc/closure.c
@@ -52,11 +52,11 @@ short *itemset;
short *itemsetend;
unsigned *ruleset;
-static void set_EFF __P((void));
+static void set_EFF(void);
#ifdef DEBUG
-static void print_closure __P((int));
-static void print_EFF __P(());
-static void print_first_derives __P(());
+static void print_closure(int);
+static void print_EFF();
+static void print_first_derives();
#endif
static unsigned *first_derives;
diff --git a/usr.bin/yacc/defs.h b/usr.bin/yacc/defs.h
index f2a8f87..4efc8a3 100644
--- a/usr.bin/yacc/defs.h
+++ b/usr.bin/yacc/defs.h
@@ -37,7 +37,6 @@
* $FreeBSD$
*/
-#include <sys/cdefs.h> /* for __P macro */
#include <assert.h>
#include <ctype.h>
#include <err.h>
@@ -312,53 +311,53 @@ extern short final_state;
/* global functions */
-char *allocate __P((unsigned));
-void closure __P((short *, int));
-void create_symbol_table __P((void));
-void default_action_warning __P((void));
-void dollar_error __P((int, char *, char *));
-void dollar_warning __P((int, int));
-void done __P((int));
-void fatal __P((const char *msg));
-void finalize_closure __P((void));
-void free_parser __P((void));
-void free_symbols __P((void));
-void free_symbol_table __P((void));
-void illegal_character __P((char *));
-void illegal_tag __P((int, char *, char *));
-void lalr __P((void));
-bucket *lookup __P((char *));
-void lr0 __P((void));
-bucket *make_bucket __P((const char *));
-void make_parser __P((void));
-void no_grammar __P((void));
-void no_space __P((void));
-void open_error __P((const char *));
-void output __P((void));
-void over_unionized __P((char *));
-void prec_redeclared __P((void));
-void reader __P((void));
-void reflexive_transitive_closure __P((unsigned *, int));
-void reprec_warning __P((char *));
-void restarted_warning __P((void));
-void retyped_warning __P((char *));
-void revalued_warning __P((char *));
-void set_first_derives __P((void));
-void syntax_error __P((int, char *, char *));
-void terminal_lhs __P((int));
-void terminal_start __P((char *));
-void tokenized_start __P((char *));
-void undefined_goal __P((char *));
-void undefined_symbol_warning __P((char *));
-void unexpected_EOF __P((void));
-void unknown_rhs __P((int));
-void unterminated_action __P((int, char *, char *));
-void unterminated_comment __P((int, char *, char *));
-void unterminated_string __P((int, char *, char *));
-void unterminated_text __P((int, char *, char *));
-void unterminated_union __P((int, char *, char *));
-void untyped_lhs __P((void));
-void untyped_rhs __P((int, char *));
-void used_reserved __P((char *));
-void verbose __P((void));
-void write_section __P((const char **));
+char *allocate(unsigned);
+void closure(short *, int);
+void create_symbol_table(void);
+void default_action_warning(void);
+void dollar_error(int, char *, char *);
+void dollar_warning(int, int);
+void done(int);
+void fatal(const char *msg);
+void finalize_closure(void);
+void free_parser(void);
+void free_symbols(void);
+void free_symbol_table(void);
+void illegal_character(char *);
+void illegal_tag(int, char *, char *);
+void lalr(void);
+bucket *lookup(char *);
+void lr0(void);
+bucket *make_bucket(const char *);
+void make_parser(void);
+void no_grammar(void);
+void no_space(void);
+void open_error(const char *);
+void output(void);
+void over_unionized(char *);
+void prec_redeclared(void);
+void reader(void);
+void reflexive_transitive_closure(unsigned *, int);
+void reprec_warning(char *);
+void restarted_warning(void);
+void retyped_warning(char *);
+void revalued_warning(char *);
+void set_first_derives(void);
+void syntax_error(int, char *, char *);
+void terminal_lhs(int);
+void terminal_start(char *);
+void tokenized_start(char *);
+void undefined_goal(char *);
+void undefined_symbol_warning(char *);
+void unexpected_EOF(void);
+void unknown_rhs(int);
+void unterminated_action(int, char *, char *);
+void unterminated_comment(int, char *, char *);
+void unterminated_string(int, char *, char *);
+void unterminated_text(int, char *, char *);
+void unterminated_union(int, char *, char *);
+void untyped_lhs(void);
+void untyped_rhs(int, char *);
+void used_reserved(char *);
+void verbose(void);
+void write_section(const char **);
diff --git a/usr.bin/yacc/error.c b/usr.bin/yacc/error.c
index e563693..5826d66 100644
--- a/usr.bin/yacc/error.c
+++ b/usr.bin/yacc/error.c
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
#include "defs.h"
-static void print_pos __P((char *, char *));
+static void print_pos(char *, char *);
void
fatal(msg)
diff --git a/usr.bin/yacc/lalr.c b/usr.bin/yacc/lalr.c
index 861644a..521b854 100644
--- a/usr.bin/yacc/lalr.c
+++ b/usr.bin/yacc/lalr.c
@@ -68,22 +68,22 @@ short *goto_map;
short *from_state;
short *to_state;
-static void add_lookback_edge __P((int, int, int));
-static void build_relations __P((void));
-static void compute_FOLLOWS __P((void));
-static void compute_lookaheads __P((void));
-static void digraph __P((short **));
-static void initialize_F __P((void));
-static void initialize_LA __P((void));
-static int map_goto __P((int, int));
-static void set_accessing_symbol __P((void));
-static void set_goto_map __P((void));
-static void set_maxrhs __P((void));
-static void set_reduction_table __P((void));
-static void set_shift_table __P((void));
-static void set_state_table __P((void));
-static short **transpose __P((short **, int));
-static void traverse __P((int));
+static void add_lookback_edge(int, int, int);
+static void build_relations(void);
+static void compute_FOLLOWS(void);
+static void compute_lookaheads(void);
+static void digraph(short **);
+static void initialize_F(void);
+static void initialize_LA(void);
+static int map_goto(int, int);
+static void set_accessing_symbol(void);
+static void set_goto_map(void);
+static void set_maxrhs(void);
+static void set_reduction_table(void);
+static void set_shift_table(void);
+static void set_state_table(void);
+static short **transpose(short **, int);
+static void traverse(int);
static int infinity;
static int maxrhs;
diff --git a/usr.bin/yacc/lr0.c b/usr.bin/yacc/lr0.c
index 6f642fd..9a70d2c 100644
--- a/usr.bin/yacc/lr0.c
+++ b/usr.bin/yacc/lr0.c
@@ -57,22 +57,22 @@ core *first_state;
shifts *first_shift;
reductions *first_reduction;
-static void allocate_itemsets __P((void));
-static void allocate_storage __P((void));
-static void append_states __P((void));
-static void free_storage __P((void));
-static void generate_states __P((void));
-static int get_state __P((int));
-static void initialize_states __P((void));
-static void new_itemsets __P((void));
-static core *new_state __P((int));
+static void allocate_itemsets(void);
+static void allocate_storage(void);
+static void append_states(void);
+static void free_storage(void);
+static void generate_states(void);
+static int get_state(int);
+static void initialize_states(void);
+static void new_itemsets(void);
+static core *new_state(int);
#ifdef DEBUG
-static void print_derives __P((void));
+static void print_derives(void);
#endif
-static void save_reductions __P((void));
-static void save_shifts __P((void));
-static void set_derives __P((void));
-static void set_nullable __P((void));
+static void save_reductions(void);
+static void save_shifts(void);
+static void set_derives(void);
+static void set_nullable(void);
static core **state_set;
static core *this_state;
diff --git a/usr.bin/yacc/main.c b/usr.bin/yacc/main.c
index cd1d5b8..0a9983c 100644
--- a/usr.bin/yacc/main.c
+++ b/usr.bin/yacc/main.c
@@ -106,12 +106,12 @@ char *rassoc;
short **derives;
char *nullable;
-static void create_file_names __P((void));
-static void getargs __P((int, char **));
-static void onintr __P((int));
-static void open_files __P((void));
-static void set_signals __P((void));
-static void usage __P((void));
+static void create_file_names(void);
+static void getargs(int, char **);
+static void onintr(int);
+static void open_files(void);
+static void set_signals(void);
+static void usage(void);
void
diff --git a/usr.bin/yacc/mkpar.c b/usr.bin/yacc/mkpar.c
index 7d61246..92612ed 100644
--- a/usr.bin/yacc/mkpar.c
+++ b/usr.bin/yacc/mkpar.c
@@ -62,17 +62,17 @@ short final_state;
static int SRcount;
static int RRcount;
-static action *add_reduce __P((action *, int, int));
-static action *add_reductions __P((int, action *));
-static void defreds __P((void));
-static void find_final_state __P((void));
-static void free_action_row __P((action *));
-static action *get_shifts __P((int));
-static action *parse_actions __P((int));
-static void remove_conflicts __P((void));
-static int sole_reduction __P((int));
-static void total_conflicts __P((void));
-static void unused_rules __P((void));
+static action *add_reduce(action *, int, int);
+static action *add_reductions(int, action *);
+static void defreds(void);
+static void find_final_state(void);
+static void free_action_row(action *);
+static action *get_shifts(int);
+static action *parse_actions(int);
+static void remove_conflicts(void);
+static int sole_reduction(int);
+static void total_conflicts(void);
+static void unused_rules(void);
void
diff --git a/usr.bin/yacc/output.c b/usr.bin/yacc/output.c
index 93c9416..695da88 100644
--- a/usr.bin/yacc/output.c
+++ b/usr.bin/yacc/output.c
@@ -49,32 +49,32 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include "defs.h"
-static int default_goto __P((int));
-static void free_itemsets __P((void));
-static void free_reductions __P((void));
-static void free_shifts __P((void));
-static void goto_actions __P((void));
-static int is_C_identifier __P((char *));
-static int matching_vector __P((int));
-static void output_actions __P((void));
-static void output_base __P((void));
-static void output_check __P((void));
-static void output_debug __P((void));
-static void output_defines __P((void));
-static void output_prefix __P((void));
-static void output_rule_data __P((void));
-static void output_semantic_actions __P((void));
-static void output_stored_text __P((void));
-static void output_stype __P((void));
-static void output_table __P((void));
-static void output_trailing_text __P((void));
-static void output_yydefred __P((void));
-static void pack_table __P((void));
-static int pack_vector __P((int));
-static void save_column __P((int, int));
-static void sort_actions __P((void));
-static void token_actions __P((void));
-static int increase_maxtable __P((int));
+static int default_goto(int);
+static void free_itemsets(void);
+static void free_reductions(void);
+static void free_shifts(void);
+static void goto_actions(void);
+static int is_C_identifier(char *);
+static int matching_vector(int);
+static void output_actions(void);
+static void output_base(void);
+static void output_check(void);
+static void output_debug(void);
+static void output_defines(void);
+static void output_prefix(void);
+static void output_rule_data(void);
+static void output_semantic_actions(void);
+static void output_stored_text(void);
+static void output_stype(void);
+static void output_table(void);
+static void output_trailing_text(void);
+static void output_yydefred(void);
+static void pack_table(void);
+static int pack_vector(int);
+static void save_column(int, int);
+static void sort_actions(void);
+static void token_actions(void);
+static int increase_maxtable(int);
static const char line_format[] = "#line %d \"%s\"\n";
static int nvectors;
diff --git a/usr.bin/yacc/reader.c b/usr.bin/yacc/reader.c
index 8d54e92..acd55b7 100644
--- a/usr.bin/yacc/reader.c
+++ b/usr.bin/yacc/reader.c
@@ -82,43 +82,43 @@ char *name_pool;
static const char line_format[] = "#line %d \"%s\"\n";
-static void add_symbol __P((void));
-static void advance_to_start __P((void));
-static void cachec __P((int));
-static void check_symbols __P((void));
-static void copy_action __P((void));
-static void copy_ident __P((void));
-static void copy_text __P((void));
-static void copy_union __P((void));
-static void declare_expect __P((int));
-static void declare_start __P((void));
-static void declare_tokens __P((int));
-static void declare_types __P((void));
-static char *dup_line __P((void));
-static void end_rule __P((void));
-static void expand_items __P((void));
-static void expand_rules __P((void));
-static void free_tags __P((void));
-static void get_line __P((void));
-static bucket *get_literal __P((void));
-static bucket *get_name __P((void));
-static int get_number __P((void));
-static char *get_tag __P((void));
-static int hexval __P((int));
-static void initialize_grammar __P((void));
-static void insert_empty_rule __P((void));
-static int is_reserved __P((char *));
-static int keyword __P((void));
-static int mark_symbol __P((void));
-static int nextc __P((void));
-static void pack_grammar __P((void));
-static void pack_names __P((void));
-static void pack_symbols __P((void));
-static void print_grammar __P((void));
-static void read_declarations __P((void));
-static void read_grammar __P((void));
-static void skip_comment __P((void));
-static void start_rule __P((bucket *, int));
+static void add_symbol(void);
+static void advance_to_start(void);
+static void cachec(int);
+static void check_symbols(void);
+static void copy_action(void);
+static void copy_ident(void);
+static void copy_text(void);
+static void copy_union(void);
+static void declare_expect(int);
+static void declare_start(void);
+static void declare_tokens(int);
+static void declare_types(void);
+static char *dup_line(void);
+static void end_rule(void);
+static void expand_items(void);
+static void expand_rules(void);
+static void free_tags(void);
+static void get_line(void);
+static bucket *get_literal(void);
+static bucket *get_name(void);
+static int get_number(void);
+static char *get_tag(void);
+static int hexval(int);
+static void initialize_grammar(void);
+static void insert_empty_rule(void);
+static int is_reserved(char *);
+static int keyword(void);
+static int mark_symbol(void);
+static int nextc(void);
+static void pack_grammar(void);
+static void pack_names(void);
+static void pack_symbols(void);
+static void print_grammar(void);
+static void read_declarations(void);
+static void read_grammar(void);
+static void skip_comment(void);
+static void start_rule(bucket *, int);
static void
cachec(c)
diff --git a/usr.bin/yacc/symtab.c b/usr.bin/yacc/symtab.c
index c808d6a..9253cbd 100644
--- a/usr.bin/yacc/symtab.c
+++ b/usr.bin/yacc/symtab.c
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
#define TABLE_SIZE 1024
-static int hash __P((const char *));
+static int hash(const char *);
bucket **symbol_table;
bucket *first_symbol;
diff --git a/usr.bin/yacc/verbose.c b/usr.bin/yacc/verbose.c
index e620650..69469f0 100644
--- a/usr.bin/yacc/verbose.c
+++ b/usr.bin/yacc/verbose.c
@@ -48,16 +48,16 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include "defs.h"
-static void log_unused __P((void));
-static void log_conflicts __P((void));
-static void print_actions __P((int));
-static void print_conflicts __P((int));
-static void print_core __P((int));
-static void print_gotos __P((int));
-static void print_nulls __P((int));
-static void print_reductions __P((action *, register int));
-static void print_shifts __P((action *));
-static void print_state __P((int));
+static void log_unused(void);
+static void log_conflicts(void);
+static void print_actions(int);
+static void print_conflicts(int);
+static void print_core(int);
+static void print_gotos(int);
+static void print_nulls(int);
+static void print_reductions(action *, register int);
+static void print_shifts(action *);
+static void print_state(int);
static short *null_rules;
diff --git a/usr.bin/yacc/warshall.c b/usr.bin/yacc/warshall.c
index 3c7bf1c..e2db00a 100644
--- a/usr.bin/yacc/warshall.c
+++ b/usr.bin/yacc/warshall.c
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
#include "defs.h"
-static void transitive_closure __P((unsigned *, int));
+static void transitive_closure(unsigned *, int);
static void
transitive_closure(R, n)
OpenPOWER on IntegriCloud