blob: 3a25a9451b03c587c426c6fe595bac9d46eaf67e (
plain) (
tree)
|
|
#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 */
|