diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-07-05 16:44:35 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-07-05 16:44:35 -0400 |
commit | 9e5195fcb119f86910a9144bdcdfe12850c1435e (patch) | |
tree | 4f4c88f449dce0bd43fe13ad5ee90cba4f303350 /src/parse.c | |
parent | d2eadc93db7611a20dce86c4af77e64b80ee29e3 (diff) | |
download | bfs-9e5195fcb119f86910a9144bdcdfe12850c1435e.tar.xz |
parse: They're called "primary expressions," not "literals"
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 12 |
1 files changed, 6 insertions, 6 deletions
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); } } |