Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. %{
  2. #include <stdio.h>
  3. //#include "ast.h"
  4.  
  5. void yyerror(char *s);
  6. int yylex();
  7.  
  8. //node_type* root = NULL;
  9. //node_type* aux_node = NULL;
  10. %}
  11.  
  12. %union{
  13. char* token;
  14. //struct node_type* node;
  15. }
  16.  
  17. %token SEMICOLON BLANKID PACKAGE RETURN AND STAR ASSIGN COMMA DIV EQ GT GE LBRACE LE LPAR
  18. %token LSQ LT MINUS MOD NE NOT OR PLUS RBRACE RPAR RSQ ELSE FOR IF VAR INT FLOAT32 BOOL
  19. %token STRING PRINT PARSEINT FUNC CMDARGS
  20.  
  21. %token <token> RESERVED ID INTLIT REALLIT STRLIT
  22.  
  23. %type <node> Program Declarations VarDeclaration VarSpec Type FuncDeclaration Parameters
  24. %type <node> FuncBody VarsAndStatements Statement ParseArgs FuncInvocation Expr
  25.  
  26. %%
  27.  
  28. %%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement