[t][TT #1610] Add tests for Parrot_compile_string
[parrot.git] / compilers / imcc / parser.h
blob4aed0705e4b9da211a8d5f52003916d4590a1f3b
1 /*
2 * Copyright (C) 2002-2009, Parrot Foundation.
3 * $Id$
4 */
6 #ifndef PARROT_IMCC_PARSER_H_GUARD
7 #define PARROT_IMCC_PARSER_H_GUARD
9 typedef struct _IdList {
10 char* id;
11 int unique_reg;
12 struct _IdList* next;
13 } 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;
23 #endif
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 */
52 * Local variables:
53 * c-file-style: "parrot"
54 * End:
55 * vim: expandtab shiftwidth=4: