Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Issues with cpp2 language module #1427

Open
tsaglam opened this issue Dec 7, 2023 · 2 comments
Open

Issues with cpp2 language module #1427

tsaglam opened this issue Dec 7, 2023 · 2 comments
Labels
bug Issue/PR that involves a bug language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change

Comments

@tsaglam
Copy link
Member

tsaglam commented Dec 7, 2023

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 tsaglam added bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change language PR / Issue deals (partly) with new and/or existing languages for JPlag labels Dec 7, 2023
@nheir
Copy link
Contributor

nheir commented Dec 7, 2023

  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

@TwoOfTwelve
Copy link
Contributor

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Issue/PR that involves a bug language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change
Projects
None yet
Development

No branches or pull requests

3 participants