blob: 70b3120ce279d3cda8a41d1b43aba4c2609f8f60 (
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
|
#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, const char * prev);
int
parse_item(const char * s, recipe * r, pt * type, char * error);
#endif /* __PARSER_H */
|