Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %{
- #include <stdio.h>
- //#include "ast.h"
- void yyerror(char *s);
- int yylex();
- //node_type* root = NULL;
- //node_type* aux_node = NULL;
- %}
- %union{
- char* token;
- //struct node_type* node;
- }
- %token SEMICOLON BLANKID PACKAGE RETURN AND STAR ASSIGN COMMA DIV EQ GT GE LBRACE LE LPAR
- %token LSQ LT MINUS MOD NE NOT OR PLUS RBRACE RPAR RSQ ELSE FOR IF VAR INT FLOAT32 BOOL
- %token STRING PRINT PARSEINT FUNC CMDARGS
- %token <token> RESERVED ID INTLIT REALLIT STRLIT
- %type <node> Program Declarations VarDeclaration VarSpec Type FuncDeclaration Parameters
- %type <node> FuncBody VarsAndStatements Statement ParseArgs FuncInvocation Expr
- %%
- %%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement