1 /* 2 * Copyright (C) 2002-2009, Parrot Foundation. 3 */ 4 5 #ifndef PARROT_IMCC_PARSER_H_GUARD 6 #define PARROT_IMCC_PARSER_H_GUARD 7 8 typedef struct _IdList { 9 char* id; 10 struct _IdList* next; 11 } IdList; 12 13 #include "imcparser.h" 14 #include "imcc/yyscanner.h" 15 16 #define KEY_BIT(argnum) (1 << (argnum)) 17 18 typedef struct yyguts_t yyguts_t; 19 20 void set_filename(imc_info_t *imcc, char * const filename); 21 22 SymReg * macro(imc_info_t *imcc, char *name); 23 24 /*int yyparse(yyscan_t, imc_info_t *imcc);*/ 25 int yylex(YYSTYPE *, yyscan_t, imc_info_t *imcc); 26 int yylex_destroy(yyscan_t); 27 28 int yylex_init(yyscan_t*); 29 int yylex_init_extra(imc_info_t *imcc, yyscan_t*); 30 int yyget_column(yyscan_t); 31 void yyset_column(int column_no , yyscan_t); 32 int yyerror(yyscan_t, imc_info_t*, const char *); 33 34 35 /* These are generated by flex. YY_EXTRA_TYPE is used also by flex, so 36 * defining it is handy: we do not need typecasts. */ 37 #define YY_EXTRA_TYPE imc_info_t* 38 YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner); 39 void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner); 40 41 extern void compile_file(imc_info_t *imcc, PIOHANDLE file, void *); 42 extern void compile_string(imc_info_t *imcc, const char *, void *); 43 extern INTVAL imcc_run_compilation(imc_info_t *imcc, void *); 44 extern INTVAL imcc_compile_buffer_safe(ARGMOD(imc_info_t *imcc), 45 yyscan_t yyscanner, ARGIN(STRING *source), int is_file, int is_pasm); 46 47 int at_eof(yyscan_t yyscanner); 48 PIOHANDLE determine_input_file_type(imc_info_t * imcc, STRING *sourcefile); 49 50 #endif /* PARROT_IMCC_PARSER_H_GUARD */ 51 52 /* 53 * Local variables: 54 * c-file-style: "parrot" 55 * End: 56 * vim: expandtab shiftwidth=4 cinoptions='\:2=2' : 57 */ 58