block: don't put spaces around :
[ironout.git] / parse.h
bloba57f98b3a8b2d4cc6ffcededc03f0d4e117b88fb
1 #ifndef _PARSE_H
2 #define _PARSE_H
4 #define YYLTYPE struct yyltype
5 #define YYSTYPE char*
6 #define YYERROR_VERBOSE 1
7 #define YYLLOC_DEFAULT(Current, Rhs, N) \
8 do \
9 if (N) { \
10 (Current).start = YYRHSLOC(Rhs, 1).start; \
11 (Current).end = YYRHSLOC(Rhs, N).end; \
12 } else { \
13 fprintf(stderr, "WARNING: couldn't find location!\n"); \
14 } \
15 while (0)
17 struct yyltype {
18 long start;
19 long end;
22 void yyerror(char *s);
23 int yylex();
24 void yyrestart(FILE *file);
25 int yyparse();
27 void reset_tokenizer(char *filename);
29 #include "cyacc.h"
30 #include "ast.h"
32 struct node *push_node(enum nodetype type, long start, long end, int nchild);
33 struct node *push_node_name(enum nodetype type, long start, long end, char *name);
34 struct node *push_decl(enum nodetype type, long start, long end,
35 int nchild, enum decltype decltype);
37 int typedef_name(char *filename, char *name, long offset);
39 #endif