Formatting
This commit is contained in:
parent
2f42a60849
commit
af934dfea8
|
@ -6,6 +6,7 @@
|
||||||
extern void emit(const char *, ...);
|
extern void emit(const char *, ...);
|
||||||
extern void yyerror(const char *);
|
extern void yyerror(const char *);
|
||||||
extern int yylex();
|
extern int yylex();
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%union {
|
%union {
|
||||||
|
@ -46,7 +47,7 @@ extern int yylex();
|
||||||
%%
|
%%
|
||||||
|
|
||||||
program:
|
program:
|
||||||
fun_decls main fun_decls | /* epsilon */
|
/* epsilon */ | fun_decls main fun_decls
|
||||||
;
|
;
|
||||||
fun_decls:
|
fun_decls:
|
||||||
/* epsilon */ | fun_decls fun_decl
|
/* epsilon */ | fun_decls fun_decl
|
||||||
|
@ -68,8 +69,7 @@ statements:
|
||||||
;
|
;
|
||||||
statement:
|
statement:
|
||||||
var_decl | assign_stmt | print_stmt | input_stmt | return_stmt |
|
var_decl | assign_stmt | print_stmt | input_stmt | return_stmt |
|
||||||
loop_stmt | branch_stmt | fun_call | abort_stmt |
|
loop_stmt | branch_stmt | fun_call | abort_stmt | /* epsilon */
|
||||||
/* epsilon */
|
|
||||||
;
|
;
|
||||||
var_decl:
|
var_decl:
|
||||||
VARDECL variable COMMA pointer TYPENAME var_init
|
VARDECL variable COMMA pointer TYPENAME var_init
|
||||||
|
|
Reference in New Issue
Block a user