#Typechecker C++

1 messages · Page 1 of 1 (latest)

ancient sluiceBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

hushed temple
#

My Typechecker.C current:

tribal sierra
#

well, what issues are you having?

hushed temple
#

We have a testsuite and it says that the base part is not fully implemented of typechecker.C

tribal sierra
#

uh ok

#

so how are we supposed to know what any of that means?

hushed temple
#

It is Skeleton.C it is a bnfc generated C++ tool and I think the issue is in my implemantation

#

and because this is cpp help I thought maybe someone could help me 😦

tribal sierra
#

we don't know what the task is
we don't know what the codebase is
we don't know what the error actually is

#

we have no context here

hushed temple
tribal sierra
#

what is the error you get?

#

does it not compile?
does it not link?

#

does it not run?

#

does it not do the right thing?

#

what thing does it do wrong?

#

why is that wrong?

#

what would the right thing look like?

hushed temple
#

my error is this: test output

######################

Assignment 0: Base

######################

Passed 77/159 tests.

Check function definitions
Check structure definitions
Check structure fields
Check function return
Check function arguments
Check variable declarations
Check function calls
Check projection operator
Check unary operators
Check the return statement
Check boolean binary operators
Check the ternary operator
Check the assignment operator
Check the three-way comparison
Check structure inheritance
Check try-catch
Check throw expression

##########################################

Assignment 1: do-while-loops, +, and <

##########################################

Passed 15/32 tests.

Check arithmetic operators
Check comparison operators
Check loop statements

#######################################

Assignment 2: while-loops, -, and >

#######################################

Passed 15/32 tests.

Check arithmetic operators
Check comparison operators
Check loop statements

######################################

Assignment 3: for-loops, *, and <=

######################################

Passed 15/32 tests.

Check arithmetic operators
Check comparison operators
Check loop statements

##########################################

Assignment 4: if-statements, /, and >=

##########################################

Passed 14/31 tests.

Check arithmetic operators
Check comparison operators
Check conditional statements

###########

Summary

###########

Passed 136/286 tests in total.
debug info
return value: 1

#

stderr
make: Warning: File 'Makefile' has modification time 1967 s in the future
Warning: unrecognized option -cpp treated as if --cpp was provided.
CPP.y:6.1-8: warning: POSIX Yacc does not support %defines [-Wyacc]
6 | %defines "Bison.H"
| ^~~~~~~~
CPP.y:6.10-18: warning: POSIX Yacc does not support string literals [-Wyacc]
6 | %defines "Bison.H"
| ^~~~~~~~~
CPP.y:9.1-12: warning: POSIX Yacc does not support %pure_parser [-Wyacc]
9 | %pure_parser
| ^~~~~~~~~~~~
CPP.y:9.1-12: warning: deprecated directive: ‘%pure_parser’, use ‘%define api.pure’ [-Wdeprecated]
9 | %pure_parser
| ^~~~~~~~~~~~
| %define api.pure
CPP.y: warning: 1 nonterminal useless in grammar [-Wother]
CPP.y: warning: 2 rules useless in grammar [-Wother]
CPP.y:278.1-6: warning: nonterminal useless in grammar: ListId [-Wother]
278 | ListId : T_Id { $$ = new ListId(); $$->push_back($1); result->listid_...
| ^~~~~~
CPP.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
make: warning: Clock skew detected. Your build may be incomplete

tribal sierra
#

ok so you're failing tests

#

and it tells you the names of the tests you're failing

hushed temple
#

It compiles but the base is not implemented I do not know what the testcases are

#

Yes exactly

tribal sierra
#

what does "the base is not implemented" mean?

hushed temple
#

That the base lacks in some code thats why I get issues 77/159

#

In the sheet you could see that my task 1 is to implement the base part

tribal sierra
#

well, i guess then adding the code that it's missing would seem like a good step?

hushed temple
#

with the typing rules

#

Yes but I do not know whats missing 😦

tribal sierra
#

i mean, i sure also don't know

#

and i don't think anyone here will know

#

but i mean

#

Check function definitions
Check structure definitions
Check structure fields
Check function return
Check function arguments
Check variable declarations
Check function calls
Check projection operator
Check unary operators
Check the return statement
Check boolean binary operators
Check the ternary operator
Check the assignment operator
Check the three-way comparison
Check structure inheritance
Check try-catch
Check throw expression

#

🤷‍♂️

#

i guess check those things

#

test those things better

hushed temple
#

Okay I will try but I do not get it otherwise I would not asked it here

tribal sierra
#

well, i'm afraid we also don't know what those tests are doing exactly

#

i'm not sure how we'd possibly be supposed to know

hushed temple
#

😦

tribal sierra
#

how do you test your stuff before submitting it?

hushed temple
#

On an website there I got this

#

It is from our uni