From 9e5195fcb119f86910a9144bdcdfe12850c1435e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 5 Jul 2022 16:44:35 -0400 Subject: parse: They're called "primary expressions," not "literals" --- src/eval.c | 2 +- src/eval.h | 2 +- src/parse.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/eval.c b/src/eval.c index 1d0a6f2..d685ab0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -15,7 +15,7 @@ ****************************************************************************/ /** - * Implementation of all the literal expressions. + * Implementation of all the primary expressions. */ #include "eval.h" diff --git a/src/eval.h b/src/eval.h index a1bbd2f..a50dc4e 100644 --- a/src/eval.h +++ b/src/eval.h @@ -15,7 +15,7 @@ ****************************************************************************/ /** - * The evaluation functions that implement literal expressions like -name, + * The evaluation functions that implement primary expressions like -name, * -print, etc. */ diff --git a/src/parse.c b/src/parse.c index 96f03dd..fbb095d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -3189,7 +3189,7 @@ static struct bfs_expr *parse_version(struct parser_state *state, int arg1, int typedef struct bfs_expr *parse_fn(struct parser_state *state, int arg1, int arg2); /** - * An entry in the parse table for literals. + * An entry in the parse table for primary expressions. */ struct table_entry { char *arg; @@ -3201,7 +3201,7 @@ struct table_entry { }; /** - * The parse table for literals. + * The parse table for primary expressions. */ static const struct table_entry parse_table[] = { {"--", T_FLAG}, @@ -3358,11 +3358,11 @@ static const struct table_entry *table_lookup_fuzzy(const char *arg) { } /** - * LITERAL : OPTION + * PRIMARY : OPTION * | TEST * | ACTION */ -static struct bfs_expr *parse_literal(struct parser_state *state) { +static struct bfs_expr *parse_primary(struct parser_state *state) { // Paths are already skipped at this point const char *arg = state->argv[0]; @@ -3423,7 +3423,7 @@ unexpected: * FACTOR : "(" EXPR ")" * | "!" FACTOR | "-not" FACTOR * | "-exclude" FACTOR - * | LITERAL + * | PRIMARY */ static struct bfs_expr *parse_factor(struct parser_state *state) { if (skip_paths(state) != 0) { @@ -3489,7 +3489,7 @@ static struct bfs_expr *parse_factor(struct parser_state *state) { return new_unary_expr(eval_not, factor, argv); } else { - return parse_literal(state); + return parse_primary(state); } } -- cgit v1.2.3