Advertisement
D3ad

IFJ_ERR

Dec 10th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.73 KB | None | 0 0
  1. gcc -std=c99 -pedantic -Wall -c -g generator.c generator.h
  2. cc -std=c99 -pedantic -Wall -c -g -c -o instruction.o instruction.c
  3. gcc -std=c99 -pedantic -Wall -c -g interpret.c interpret.h
  4. gcc -std=c99 -pedantic -Wall -c -g main.c main.h
  5. gcc -std=c99 -pedantic -Wall -c -g parser.c parser.h
  6. parser.c: In function ‘program’:
  7. parser.c:67:14: error: ‘i_stop’ undeclared (first use in this function)
  8. generate(i_stop, NULL, NULL, NULL); // generovanie instrukcie konca programu
  9. ^
  10. parser.c:67:14: note: each undeclared identifier is reported only once for each function it appears in
  11. parser.c:67:5: error: too few arguments to function ‘generate’
  12. generate(i_stop, NULL, NULL, NULL); // generovanie instrukcie konca programu
  13. ^
  14. In file included from parser.h:10:0:
  15. generator.h:76:12: note: declared here
  16. TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
  17. ^
  18. parser.c: In function ‘var_def’:
  19. parser.c:105:9: warning: implicit declaration of function ‘semanticDeclarationCheck’ [-Wimplicit-function-declaration]
  20. if(semanticDeclarationCheck(token.HashTable_ptr) != 0) // doplnit typ
  21. ^
  22. parser.c: In function ‘param_list’:
  23. parser.c:284:13: warning: implicit declaration of function ‘semanticDeclaration’ [-Wimplicit-function-declaration]
  24. semanticDeclaration(token.HashTable_ptr);
  25. ^
  26. parser.c: In function ‘assign_stat’:
  27. parser.c:362:9: warning: implicit declaration of function ‘expr’ [-Wimplicit-function-declaration]
  28. if(expr() != 0)
  29. ^
  30. parser.c: In function ‘func_stat’:
  31. parser.c:520:9: error: invalid initializer
  32. token_s vst_ID = token.typ; // ulozime si IDcko pre pripadne vstavane funkcie
  33. ^
  34. parser.c:532:17: error: switch quantity not an integer
  35. switch (vst_ID)
  36. ^
  37. parser.c:534:18: error: ‘T_K_LENGTH’ undeclared (first use in this function)
  38. case T_K_LENGTH:
  39. ^
  40. parser.c:542:53: error: ‘dest’ undeclared (first use in this function)
  41. generate(i_length, token.typ, NULL, dest);
  42. ^
  43. parser.c:542:17: warning: passing argument 2 of ‘generate’ makes pointer from integer without a cast [enabled by default]
  44. generate(i_length, token.typ, NULL, dest);
  45. ^
  46. In file included from parser.h:10:0:
  47. generator.h:76:12: note: expected ‘void *’ but argument is of type ‘int’
  48. TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
  49. ^
  50. parser.c:542:17: error: too few arguments to function ‘generate’
  51. generate(i_length, token.typ, NULL, dest);
  52. ^
  53. In file included from parser.h:10:0:
  54. generator.h:76:12: note: declared here
  55. TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
  56. ^
  57. parser.c:551:17: error: invalid initializer
  58. token_s param1 = token.typ;
  59. ^
  60. parser.c:559:17: error: invalid initializer
  61. token_s param2 = token.typ;
  62. ^
  63. parser.c:562:17: error: incompatible type for argument 2 of ‘generate’
  64. generate(i_find, param1, param2, dest);
  65. ^
  66. In file included from parser.h:10:0:
  67. generator.h:76:12: note: expected ‘void *’ but argument is of type ‘token_s’
  68. TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
  69. ^
  70. parser.c:562:17: error: incompatible type for argument 3 of ‘generate’
  71. generate(i_find, param1, param2, dest);
  72. ^
  73. In file included from parser.h:10:0:
  74. generator.h:76:12: note: expected ‘void *’ but argument is of type ‘token_s’
  75. TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
  76. ^
  77. parser.c:562:17: error: too few arguments to function ‘generate’
  78. generate(i_find, param1, param2, dest);
  79. ^
  80. In file included from parser.h:10:0:
  81. generator.h:76:12: note: declared here
  82. TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
  83. ^
  84. parser.c:571:36: warning: value computed is not used [-Wunused-value]
  85. default: (param_list() != 0)
  86. ^
  87. parser.c:572:17: error: expected ‘;’ before ‘return’
  88. return -1;
  89. ^
  90. parser.c:520:17: warning: variable ‘vst_ID’ set but not used [-Wunused-but-set-variable]
  91. token_s vst_ID = token.typ; // ulozime si IDcko pre pripadne vstavane funkcie
  92. ^
  93. parser.c: In function ‘readln_stat’:
  94. parser.c:619:49: error: expected ‘)’ before ‘.’ token
  95. generate(i_cin, NULL, NULL, (token_s.attr)->ptr); // generovanie 3 adr kodu pre read, adr3 je ukazatel na ID do tabulky symb.
  96. ^
  97. parser.c:619:55: error: expected expression before ‘->’ token
  98. generate(i_cin, NULL, NULL, (token_s.attr)->ptr); // generovanie 3 adr kodu pre read, adr3 je ukazatel na ID do tabulky symb.
  99. ^
  100. parser.c:619:55: error: too few arguments to function ‘generate’
  101. In file included from parser.h:10:0:
  102. generator.h:76:12: note: declared here
  103. TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
  104. ^
  105. parser.c: In function ‘write_stat’:
  106. parser.c:654:31: error: expected expression before ‘||’ token
  107. if(token.typ != T_ID) || (token.typ != T_INT) || (token.typ != T_STRING) || (token.typ != T_BOOLEAN) || (token.typ != T_DOUBLE) // term
  108. ^
  109. parser.c: In function ‘vars_def’:
  110. parser.c:93:1: warning: control reaches end of non-void function [-Wreturn-type]
  111. }
  112. ^
  113. parser.c: In function ‘func_def’:
  114. parser.c:250:5: warning: control reaches end of non-void function [-Wreturn-type]
  115. }
  116. ^
  117. parser.c: In function ‘param_list’:
  118. parser.c:303:5: warning: control reaches end of non-void function [-Wreturn-type]
  119. }
  120. ^
  121. parser.c: In function ‘param_def’:
  122. parser.c:342:5: warning: control reaches end of non-void function [-Wreturn-type]
  123. }
  124. ^
  125. parser.c: In function ‘statement_e’:
  126. parser.c:427:5: warning: control reaches end of non-void function [-Wreturn-type]
  127. }
  128. ^
  129. parser.c: In function ‘write_stat’:
  130. parser.c:673:5: warning: control reaches end of non-void function [-Wreturn-type]
  131. }
  132. ^
  133. make: *** [parser.o] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement