2 * Copyright (C) 2002-2009, Parrot Foundation.
6 #ifndef PARROT_IMCC_PARSER_H_GUARD
7 #define PARROT_IMCC_PARSER_H_GUARD
9 typedef struct _IdList
{
15 #include "imcparser.h"
17 #define KEY_BIT(argnum) (1 << (argnum))
19 /* An opaque pointer. */
20 #ifndef YY_TYPEDEF_YY_SCANNER_T
21 # define YY_TYPEDEF_YY_SCANNER_T
22 typedef void* yyscan_t
;
25 void set_filename(PARROT_INTERP
, char * const filename
);
27 SymReg
* macro(PARROT_INTERP
, char *name
);
29 PARROT_EXPORT
int yyparse(yyscan_t
, PARROT_INTERP
);
30 PARROT_EXPORT
int yylex(YYSTYPE
*, yyscan_t
, PARROT_INTERP
);
31 PARROT_EXPORT
int yylex_destroy(yyscan_t
);
33 int yylex_init(yyscan_t
*);
34 int yyget_column(yyscan_t
);
35 void yyset_column(int column_no
, yyscan_t
);
36 int yyerror(yyscan_t
, Interp
*, const char *);
38 /* These are generated by flex. YY_EXTRA_TYPE is used also by flex, so
39 * defining it is handy: we do not need typecasts. */
40 #define YY_EXTRA_TYPE Interp*
41 YY_EXTRA_TYPE
yyget_extra(yyscan_t yyscanner
);
42 void yyset_extra(YY_EXTRA_TYPE user_defined
, yyscan_t yyscanner
);
44 extern void compile_file(PARROT_INTERP
, FILE *file
, void *);
45 extern void compile_string(PARROT_INTERP
, const char *, void *);
47 int at_eof(yyscan_t yyscanner
);
49 #endif /* PARROT_IMCC_PARSER_H_GUARD */
53 * c-file-style: "parrot"
55 * vim: expandtab shiftwidth=4: