diff --git a/README.md b/README.md index f9ff150b2..8bf827578 100644 --- a/README.md +++ b/README.md @@ -1332,6 +1332,7 @@ For multisegment variable lengths tests: ## Changelog - #### 2.4.4 will be released soon. - [#435](https://github.com/AbsaOSS/cobrix/issues/435) Fixed 'INDEXED BY' clause followed by multiple identifiers. + - [#437](https://github.com/AbsaOSS/cobrix/issues/437) Added support for '@' characters inside identifier names. - #### 2.4.3 released 26 October 2021. - [#430](https://github.com/AbsaOSS/cobrix/issues/430) Added support for 'twisted' RDW headers when big-endian or little-endian RDWs use unexpected RDW bytes. diff --git a/cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.g4 b/cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.g4 index 69169db9c..10dace21a 100644 --- a/cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.g4 +++ b/cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.g4 @@ -229,7 +229,7 @@ fragment SIGN_CHAR: // identifiers SINGLE_QUOTED_IDENTIFIER: '\'' IDENTIFIER '\'' ([-_]* [a-zA-Z0-9]+)+; -IDENTIFIER: [a-zA-Z0-9:]+ [-_:a-zA-Z0-9]*; +IDENTIFIER: [a-zA-Z0-9:]+ [-_@:a-zA-Z0-9]*; // case insensitive chars fragment A:('a'|'A'); diff --git a/cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.java b/cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.java index 861e6a5eb..b6076c06b 100644 --- a/cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.java +++ b/cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/antlr/copybookLexer.java @@ -328,7 +328,7 @@ public copybookLexer(CharStream input) { "\2\u012d\2\u012f\2\u0131\2\u0133\2\u0135\2\u0137\2\u0139\2\u013b\2\u013d"+ "\2\u013f\u0084\u0141\u0085\3\2*\5\2\13\f\16\17\"\"\4\2\f\f\17\17\4\2\62"+ ";CH\5\2\f\f\17\17$$\5\2\f\f\17\17))\3\2\64;\3\2\63\66\3\2\62;\3\2\63;"+ - "\4\2//aa\5\2\62;C\\c|\5\2\62