/
parser.h
68 lines (52 loc) · 1.48 KB
/
parser.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Copyright (C) 2002-2008, The Perl Foundation.
*/
/*
* XXX - We need a description of the file here
*
* $Id$
*/
#ifndef PARROT_IMCC_PARSER_H_GUARD
#define PARROT_IMCC_PARSER_H_GUARD
#ifdef PARSER_MAIN
# define EXTERN
#else
# define EXTERN extern
#endif
typedef struct _IdList {
char* id;
int unique_reg;
struct _IdList* next;
} IdList;
#include "imcparser.h"
/* short ranged globals for lexer state */
EXTERN int is_def;
#define KEY_BIT(argnum) (1 << (argnum))
/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
# define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif
SymReg * macro(PARROT_INTERP, char *name);
PARROT_API int yyparse(yyscan_t, PARROT_INTERP);
PARROT_API int yylex(YYSTYPE *, yyscan_t, PARROT_INTERP);
PARROT_API int yylex_destroy(yyscan_t);
int yylex_init(yyscan_t*);
int yyget_column(yyscan_t);
void yyset_column(int column_no , yyscan_t);
int yyerror(yyscan_t, Interp*, const char *);
/* These are generated by flex. YY_EXTRA_TYPE is used also by flex, so
* defining it is handy: we do not need typecasts. */
#define YY_EXTRA_TYPE Interp*
YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner);
void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner);
extern void compile_file(PARROT_INTERP, FILE *file, void *);
extern void compile_string(PARROT_INTERP, char *, void *);
int at_eof(yyscan_t yyscanner);
#endif /* PARROT_IMCC_PARSER_H_GUARD */
/*
* Local variables:
* c-file-style: "parrot"
* End:
* vim: expandtab shiftwidth=4:
*/