-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlyutils.h
48 lines (37 loc) · 1.04 KB
/
lyutils.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
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef __LYUTILS_H__
#define __LYUTILS_H__
// Lex and Yacc interface utility.
#include <stdio.h>
#include "astree.h"
#include "auxlib.h"
#define YYEOF 0
extern FILE* yyin;
extern astree* yyparse_astree;
extern int yyin_linenr;
extern char* yytext;
extern int yy_flex_debug;
extern int yydebug;
extern int yyleng;
extern FILE* tok_file;
int yylex (void);
int yyparse (void);
void yyerror (const char* message);
int yylex_destroy (void);
const char* get_yytname (int symbol);
bool is_defined_token (int symbol);
const string* scanner_filename (int filenr);
void scanner_newfilename (const char* filename);
void scanner_badchar (unsigned char bad);
void scanner_badtoken (char* lexeme);
void scanner_newline (void);
void scanner_setecho (bool echoflag);
void scanner_useraction (void);
astree* new_parsenode (int tok_type, const char* type_str);
astree* new_parseroot (void);
int yylval_token (int symbol);
void error_destructor (astree*);
void scanner_include (void);
typedef astree* astree_pointer;
#define YYSTYPE astree_pointer
#include "yyparse.h"
#endif