antlr / grammars-v4

Grammars written for ANTLR v4; expectation that the grammars are free of actions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CPP Unicode identifier

TwoOfTwelve opened this issue · comments

If I understand the CPP14 documentation correctly identifiers can contain (nearly) all Unicode letters. Meaning the following code is valid CPP (compiles with gcc):

int main() {
        int ÔŒλ = 1;
}

This code cannot be parsed with the cpp grammar, because identifiers can only contain Unicode escape sequences.