i'm doing a project on software plagiarism detection in which i need to compare 2 .c files for that i need to create a parser. from where do i start?
Three answers:
Kermit The Rock
2011-01-06 22:07:29 UTC
A simplistic way is to find the longest common substring (LCS) between the two files. Since its a c program, instead of pure string, I might use longest common sequence of words, where words are defined by any c whitespace characters :)
Want to get fancy? Ignore variable names and find longest sequence of valid tokens.
You'll have to use a ratio of length of the LCS to total file length. You'll have to decide how large a ratio indicates suspected plagiarism.
?
2016-12-10 08:44:02 UTC
you should use yo C software to construct yo very own parser Wit yo very own regulations! yo kno the cc,gcc and g++ compilers are geared up using C ,,,, so i don think of so turning out to be your very own parser isn't tat complicated!
?
2011-01-06 21:40:57 UTC
I don't have an answer for you, but the fact that your a female programmer is awesome.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.