JPlag icon indicating copy to clipboard operation
JPlag copied to clipboard

Issues with cpp2 language module

Open tsaglam opened this issue 1 year ago • 2 comments

From #1408:

I got errors while using cpp2 on C file a quick test/analysis suggests that cpp2 assumes the code is C++ and that new is a keyword while it's not in C

more tests: cpp2 doesn't allow ÔŒλ and alike

tsaglam avatar Dec 07 '23 07:12 tsaglam

  1. the C++ grammars-v4 targets C++14, the grammars-v4 repository also contains a grammar for C targeting C11, avoiding the new keyword issue

  2. None support extended character (but \uXXXX are well supported). Reading the standard, it looks like those characters are implementation defined characters, and I suppose it's either a burden or not possible to have then in the a generic way in the grammar. If jplag assumes a specific encoding for files, it may uses a patched version of the gramar to address the issue. In an other hand, non ascii characters in identifier are far from common

nheir avatar Dec 07 '23 11:12 nheir

The problem with Unicode identifiers is an antlr error. An issue has been created: https://github.com/antlr/grammars-v4/issues/3952

TwoOfTwelve avatar Jan 30 '24 15:01 TwoOfTwelve