Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gcc -std=c99 -pedantic -Wall -c -g generator.c generator.h
- cc -std=c99 -pedantic -Wall -c -g -c -o instruction.o instruction.c
- gcc -std=c99 -pedantic -Wall -c -g interpret.c interpret.h
- gcc -std=c99 -pedantic -Wall -c -g main.c main.h
- gcc -std=c99 -pedantic -Wall -c -g parser.c parser.h
- parser.c: In function ‘program’:
- parser.c:67:14: error: ‘i_stop’ undeclared (first use in this function)
- generate(i_stop, NULL, NULL, NULL); // generovanie instrukcie konca programu
- ^
- parser.c:67:14: note: each undeclared identifier is reported only once for each function it appears in
- parser.c:67:5: error: too few arguments to function ‘generate’
- generate(i_stop, NULL, NULL, NULL); // generovanie instrukcie konca programu
- ^
- In file included from parser.h:10:0:
- generator.h:76:12: note: declared here
- TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
- ^
- parser.c: In function ‘var_def’:
- parser.c:105:9: warning: implicit declaration of function ‘semanticDeclarationCheck’ [-Wimplicit-function-declaration]
- if(semanticDeclarationCheck(token.HashTable_ptr) != 0) // doplnit typ
- ^
- parser.c: In function ‘param_list’:
- parser.c:284:13: warning: implicit declaration of function ‘semanticDeclaration’ [-Wimplicit-function-declaration]
- semanticDeclaration(token.HashTable_ptr);
- ^
- parser.c: In function ‘assign_stat’:
- parser.c:362:9: warning: implicit declaration of function ‘expr’ [-Wimplicit-function-declaration]
- if(expr() != 0)
- ^
- parser.c: In function ‘func_stat’:
- parser.c:520:9: error: invalid initializer
- token_s vst_ID = token.typ; // ulozime si IDcko pre pripadne vstavane funkcie
- ^
- parser.c:532:17: error: switch quantity not an integer
- switch (vst_ID)
- ^
- parser.c:534:18: error: ‘T_K_LENGTH’ undeclared (first use in this function)
- case T_K_LENGTH:
- ^
- parser.c:542:53: error: ‘dest’ undeclared (first use in this function)
- generate(i_length, token.typ, NULL, dest);
- ^
- parser.c:542:17: warning: passing argument 2 of ‘generate’ makes pointer from integer without a cast [enabled by default]
- generate(i_length, token.typ, NULL, dest);
- ^
- In file included from parser.h:10:0:
- generator.h:76:12: note: expected ‘void *’ but argument is of type ‘int’
- TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
- ^
- parser.c:542:17: error: too few arguments to function ‘generate’
- generate(i_length, token.typ, NULL, dest);
- ^
- In file included from parser.h:10:0:
- generator.h:76:12: note: declared here
- TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
- ^
- parser.c:551:17: error: invalid initializer
- token_s param1 = token.typ;
- ^
- parser.c:559:17: error: invalid initializer
- token_s param2 = token.typ;
- ^
- parser.c:562:17: error: incompatible type for argument 2 of ‘generate’
- generate(i_find, param1, param2, dest);
- ^
- In file included from parser.h:10:0:
- generator.h:76:12: note: expected ‘void *’ but argument is of type ‘token_s’
- TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
- ^
- parser.c:562:17: error: incompatible type for argument 3 of ‘generate’
- generate(i_find, param1, param2, dest);
- ^
- In file included from parser.h:10:0:
- generator.h:76:12: note: expected ‘void *’ but argument is of type ‘token_s’
- TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
- ^
- parser.c:562:17: error: too few arguments to function ‘generate’
- generate(i_find, param1, param2, dest);
- ^
- In file included from parser.h:10:0:
- generator.h:76:12: note: declared here
- TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
- ^
- parser.c:571:36: warning: value computed is not used [-Wunused-value]
- default: (param_list() != 0)
- ^
- parser.c:572:17: error: expected ‘;’ before ‘return’
- return -1;
- ^
- parser.c:520:17: warning: variable ‘vst_ID’ set but not used [-Wunused-but-set-variable]
- token_s vst_ID = token.typ; // ulozime si IDcko pre pripadne vstavane funkcie
- ^
- parser.c: In function ‘readln_stat’:
- parser.c:619:49: error: expected ‘)’ before ‘.’ token
- generate(i_cin, NULL, NULL, (token_s.attr)->ptr); // generovanie 3 adr kodu pre read, adr3 je ukazatel na ID do tabulky symb.
- ^
- parser.c:619:55: error: expected expression before ‘->’ token
- generate(i_cin, NULL, NULL, (token_s.attr)->ptr); // generovanie 3 adr kodu pre read, adr3 je ukazatel na ID do tabulky symb.
- ^
- parser.c:619:55: error: too few arguments to function ‘generate’
- In file included from parser.h:10:0:
- generator.h:76:12: note: declared here
- TListItem *generate(InstrucType instrucType, void *adr1, void *adr2, void *adr3, unsigned int line);
- ^
- parser.c: In function ‘write_stat’:
- parser.c:654:31: error: expected expression before ‘||’ token
- if(token.typ != T_ID) || (token.typ != T_INT) || (token.typ != T_STRING) || (token.typ != T_BOOLEAN) || (token.typ != T_DOUBLE) // term
- ^
- parser.c: In function ‘vars_def’:
- parser.c:93:1: warning: control reaches end of non-void function [-Wreturn-type]
- }
- ^
- parser.c: In function ‘func_def’:
- parser.c:250:5: warning: control reaches end of non-void function [-Wreturn-type]
- }
- ^
- parser.c: In function ‘param_list’:
- parser.c:303:5: warning: control reaches end of non-void function [-Wreturn-type]
- }
- ^
- parser.c: In function ‘param_def’:
- parser.c:342:5: warning: control reaches end of non-void function [-Wreturn-type]
- }
- ^
- parser.c: In function ‘statement_e’:
- parser.c:427:5: warning: control reaches end of non-void function [-Wreturn-type]
- }
- ^
- parser.c: In function ‘write_stat’:
- parser.c:673:5: warning: control reaches end of non-void function [-Wreturn-type]
- }
- ^
- make: *** [parser.o] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement