blob: 3a25a9451b03c587c426c6fe595bac9d46eaf67e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef __PARSER_H
#define __PARSER_H
#include "types.h"
#define LINE_SIZE 4096
typedef enum parser_type {
TITLE = 0,
ITEMS,
STEPS,
} pt;
/**
* Return a recipe struct after parsing file in path.
*
* Path can be relative or full, ~ will be resolved as $HOME, and - will accept
* input from stdin
*/
recipe *
parse(char * path);
int
parse_item(const char * s, recipe * r, pt * type, char * error);
int
parse_step(const char * s, recipe * r, char * error);
#endif /* __PARSER_H */
|