Advertisement
Guest User

Untitled

a guest
Dec 4th, 2015
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. /**
  2. * Předmět: IFJ / IAL
  3. * Projekt: Implementace interpretu imperativního jazyka IFJ15
  4. * Soubor: main.c
  5. * Datum: 12.10.2015
  6. * Autoři: Marek Hrvol <xhrvol00@stud.fit.vutbr.cz>
  7. * Vilém Hujňák <xhujna01@stud.fit.vutbr.cz>
  8. * Tomáš Hink <xhinkt00@stud.fit.vutbr.cz>
  9. * Honza Stratil <xstrat10@stud.fit.vutbr.cz>
  10. * Tomáš Hanzlík <xhanzl11@stud.fit.vutbr.cz>
  11. */
  12. // TODO: ERROR kody, jak se to osetruje, return, glob pormenna...
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #include <stdbool.h>
  16. #include <string.h>
  17. #include "error.h"
  18. #include "parser.h"
  19. #include "token.h"
  20. #include "str.h"
  21. #include "bstrom.h"
  22. #include "scanner.h"
  23. #include "garbage.h"
  24. #include "instr.h"
  25. #include "interpret.h"
  26.  
  27.  
  28.  
  29.  
  30. /**
  31. * Hlavní funkce překladače
  32. * @param Počet argumentů programu
  33. * @param Pole argumentů programu
  34. * @return Kód chyby z ERRORS
  35. */
  36.  
  37.  
  38.  
  39. int main () {
  40.  
  41. TInstrList * list = InitInstrList();
  42.  
  43.  
  44. //String * string = stringInitText("prvni_promenna");
  45. int * trolo = (int*)malloc(sizeof(int));
  46. int type = TT_Int;
  47. char var[100] = "fsfsd";
  48.  
  49. TInstrElem * elem = CreateInstrStruct(MOV, (void *)var, (void *)trolo, (void *)(&type));
  50. PreInsertInstr(list,elem);
  51.  
  52. int a = execute(list->First);
  53. printf("chyb. kod: %d", a);
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement