36 #define PARSE_ERROR(a, b) PARSE_ERROR_##a, unsigned int line
Definition: parser.h:45
struct random parser_getrand(struct parser *p, const char *name)
Returns the random value named name.
Definition: parser.c:566
Low-level bit vector manipulation.
bool parser_hasval(struct parser *p, const char *name)
Returns whether the parser has a value named name.
Definition: parser.c:507
parser_error
Definition: parser.h:35
errr parser_reg(struct parser *p, const char *fmt, enum parser_error(*func)(struct parser *p))
Registers a parser hook.
Definition: parser.c:468
int parser_getint(struct parser *p, const char *name)
Returns the integer named name.
Definition: parser.c:539
int parser_getstate(struct parser *p, struct parser_state *s)
Fills the provided struct with the parser's state, if any.
Definition: parser.c:585
unsigned int parser_getuint(struct parser *p, const char *name)
Returns the unsigned integer named name.
Definition: parser.c:548
int errr
ANSI C headers.
Definition: h-basic.h:164
const char * name
Definition: generate.c:62
char * msg
Definition: parser.h:47
const char * parser_getsym(struct parser *p, const char *name)
Returns the symbol named name.
Definition: parser.c:530
Represent more complex dice than random_value.
const char ** p[]
Definition: name.c:40
void * parser_priv(struct parser *p)
Gets parser's private data.
Definition: parser.c:336
Parse errors and descriptions.
struct parser * parser_new(void)
Allocates a new parser.
Definition: parser.c:88
void parser_destroy(struct parser *p)
Destroys a parser.
Definition: parser.c:384
A struct representing a strategy for making a dice roll.
Definition: z-rand.h:40
const char * parser_getstr(struct parser *p, const char *name)
Returns the string named name.
Definition: parser.c:557
unsigned int col
Definition: parser.h:46
void parser_setpriv(struct parser *p, void *v)
Sets parser's private data.
Definition: parser.c:345
enum parser_error parser_parse(struct parser *p, const char *line)
Parses the provided line.
Definition: parser.c:205
enum parser_error ignored(struct parser *p)
A placeholder parse hook indicating a value is ignored.
Definition: parser.c:498
Intialize random names
Definition: init.c:847
void parser_setstate(struct parser *p, unsigned int col, const char *msg)
Sets the parser's detailed error description and field number.
Definition: parser.c:596
wchar_t parser_getchar(struct parser *p, const char *name)
Returns the character named name.
Definition: parser.c:575
enum parser_error error
Definition: parser.h:44
A Random Number Generator for Angband.