jack-compiler/parser/parser.h

21 lines
382 B
C
Raw Normal View History

2020-12-14 14:12:20 -05:00
#ifndef PARSER_H
#define PARSER_H
#include "tokenizer.h"
2020-12-21 18:35:41 -05:00
#include "parser-tree.h"
2020-12-14 14:12:20 -05:00
2020-12-31 18:24:27 -05:00
/* parser
* This is the file that should be included in other modules
* that want to parse a file. */
2020-12-14 14:12:20 -05:00
typedef struct {
TOKEN* tokens;
TOKEN* current;
TOKEN* checkpoint;
char* file;
} PARSER;
2021-01-03 14:08:54 -05:00
PARSER* mkparser(TOKEN* t, char* file);
CLASS* parse(PARSER* p);
void freeparser(PARSER* p);
2020-12-14 14:12:20 -05:00
#endif