-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparse_text.h
36 lines (29 loc) · 1015 Bytes
/
parse_text.h
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
30
31
32
33
34
35
36
/**
* authors: Dillon O'Leary
* Ezra Boley
*/
#ifndef __PARSE_TEXT__H__
#define __PARSE_TEXT__H__
#include <stdio.h>
#include <stdbool.h>
#include "parser.h"
// This file is more of the low level implentation of the parser
// than the parser.h which is more in charge of API
/* Splits the strings into individual words */
char **tokenize(char *line, int *depsLen);//, BuildSpecList *buildSpecList);
/*
* Opens up a makefile, Makefile, or custom filename
*/
FILE **open_makefile(bool is_custom_name, char *filename);
/*
* The overall wrapper that handles parsing the entire build file.
* It sets up all of the commands that will need to be fulfilled
*/
int get_build_spec_list(BuildSpecList *specs, bool fflag, char *filename);
/* Gets a single line from an open file */
void get_file_line(FILE *fp, bool *isEnd, int lineNum, char *fileLine);
/* Breaks apart the line fills in the build spec list based on
* that file line
*/
void parse_line(char *file_line, BuildSpecList *bsl, int lineNum);
#endif