43 err(EX_TEMPFAIL,
"Cannot allocate term (%zu bytes)",
sizeof *
term);
53 errx(2,
"%s: %s",
buf, msg);
61 new->fn_parent =
term;
63 &
term->fn_head : &
term->fn_tail->fn_next) =
new;
77 err(EX_SOFTWARE,
"impossible token");
125 error(
ctx,
"\"}\" or \";\"expected");
126 }
else if (result == 0)
127 error(
ctx,
"unterminated field list");
139 switch (
term->fn_tok.ft_type) {
175 error(
ctx,
"declaration must be terminated " 176 "with an identifier");
190 error(
ctx,
"\"require\" must be followed by a pathname");
const char * ff2c_term_type_name[]
static struct ff2c_term * add(struct ff2c_term *term)
static int type(struct ff2c_context *ctx, struct ff2c_term *term)
void ff2c_token_put(struct ff2c_context *ctx, struct ff2c_token *tok)
int ff2c_token_get(struct ff2c_context *ctx, struct ff2c_token *tok)
static int field_list(struct ff2c_context *ctx, struct ff2c_term *term)
static int ff(struct ff2c_context *ctx, struct ff2c_term *term)
static int declaration(struct ff2c_context *ctx, struct ff2c_term *term)
enum ff2c_token_type ft_type
static int field(struct ff2c_context *ctx, struct ff2c_term *term)
static struct ff2c_term * alloc(void)
static int statement(struct ff2c_context *ctx, struct ff2c_term *term)
static void token(struct ff2c_context *ctx, struct ff2c_term *term, struct ff2c_token *tok)
static void error(struct ff2c_context *ctx, const char *msg)
int ff2c_context_loc(struct ff2c_context *ctx, int nr, char *buf)
static int require(struct ff2c_context *ctx, struct ff2c_term *term)
struct m0_rpc_fop_session_terminate term
void ff2c_term_fini(struct ff2c_term *term)
int ff2c_parse(struct ff2c_context *ctx, struct ff2c_term **out)