+ Oops; forgot to check for trailing whitespace.
[parrot.git] / compilers / imcc / parser.h
blob6bd9972fe6c747d1efe2bd9cee267cdae313c6ee
1 /*
2 * Copyright (C) 2002-2008, The Perl Foundation.
3 */
5 /*
6 * XXX - We need a description of the file here
8 * $Id$
9 */
11 #ifndef PARROT_IMCC_PARSER_H_GUARD
12 #define PARROT_IMCC_PARSER_H_GUARD
14 #ifdef PARSER_MAIN
15 # define EXTERN
16 #else
17 # define EXTERN extern
18 #endif
20 typedef struct _IdList {
21 char* id;
22 int unique_reg;
23 struct _IdList* next;
24 } IdList;
26 #include "imcparser.h"
28 /* short ranged globals for lexer state */
29 EXTERN int is_def;
31 #define KEY_BIT(argnum) (1 << (argnum))
33 /* An opaque pointer. */
34 #ifndef YY_TYPEDEF_YY_SCANNER_T
35 # define YY_TYPEDEF_YY_SCANNER_T
36 typedef void* yyscan_t;
37 #endif
39 SymReg * macro(PARROT_INTERP, char *name);
41 PARROT_API int yyparse(yyscan_t, PARROT_INTERP);
42 PARROT_API int yylex(YYSTYPE *, yyscan_t, PARROT_INTERP);
43 PARROT_API int yylex_destroy(yyscan_t);
45 int yylex_init(yyscan_t*);
46 int yyget_column(yyscan_t);
47 void yyset_column(int column_no , yyscan_t);
48 int yyerror(yyscan_t, Interp*, const char *);
50 /* These are generated by flex. YY_EXTRA_TYPE is used also by flex, so
51 * defining it is handy: we do not need typecasts. */
52 #define YY_EXTRA_TYPE Interp*
53 YY_EXTRA_TYPE yyget_extra(yyscan_t yyscanner);
54 void yyset_extra(YY_EXTRA_TYPE user_defined, yyscan_t yyscanner);
56 extern void compile_file(PARROT_INTERP, FILE *file, void *);
57 extern void compile_string(PARROT_INTERP, char *, void *);
59 int at_eof(yyscan_t yyscanner);
61 #endif /* PARROT_IMCC_PARSER_H_GUARD */
64 * Local variables:
65 * c-file-style: "parrot"
66 * End:
67 * vim: expandtab shiftwidth=4: